Fix test cases for unified_diff

This commit is contained in:
Joey Pinhas 2019-09-24 15:21:45 -04:00
parent 31e740ed05
commit 7d878b55ff

View file

@ -111,9 +111,7 @@ def test_diffing_output(capsys):
resource_path = get_resource_path('not_pretty_formatted_json.json') resource_path = get_resource_path('not_pretty_formatted_json.json')
expected_retval = 1 expected_retval = 1
expected_out = '''\ expected_out = '''\
--- --- \n+++ \n@@ -1,6 +1,9 @@
+++
@@ -1,6 +1,9 @@
{ {
- "foo": - "foo":
- "bar", - "bar",
@ -128,7 +126,7 @@ def test_diffing_output(capsys):
+ "foo": "bar" + "foo": "bar"
} }
''' # noqa: W291 '''
expected_err = 'File {} is not pretty-formatted\n'.format(resource_path) expected_err = 'File {} is not pretty-formatted\n'.format(resource_path)
actual_retval = main([resource_path]) actual_retval = main([resource_path])