mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-10 05:14:18 +00:00
Fix test cases for unified_diff
This commit is contained in:
parent
31e740ed05
commit
7d878b55ff
1 changed files with 2 additions and 4 deletions
|
|
@ -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])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue