Work around different versions of patch(1) in unit tests

Review Request #10164 — Created Sept. 22, 2018 and submitted

Information

Review Board
release-4.0.x
f3b1cc3...

Reviewers

We had a unit test that depended on the specific version of patch(1)
installed. Newer versions of patch will accept a diff that contains no
hunks, whereas older versions will fail with a message saying that the
input contained only garbage.

We now have unit tests that check the correct behaviour happens in both
cases by replacing our call to patch(1).

Ran unit tests.

Description From Last Updated

In your description, "replacing out call to patch(1)" doesn't sound quite right, grammatically.

daviddavid

Should this be a test assertion rather than using the assert keyword?

daviddavid
david
  1. 
      
  2. Show all issues

    In your description, "replacing out call to patch(1)" doesn't sound quite right, grammatically.

  3. reviewboard/diffviewer/tests/test_diffutils.py (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    Should this be a test assertion rather than using the assert keyword?

  4. 
      
brennie
brennie
david
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (c76b74f)