[diffoscope] 04/05: Add test in JSON comparator for non-existing files.

Chris Lamb chris at chris-lamb.co.uk
Sun Aug 21 00:51:07 CEST 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit c78487f5b15497e38336304622e48cf3707c1c54
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Aug 20 23:33:15 2016 +0100

    Add test in JSON comparator for non-existing files.
---
 tests/comparators/test_json.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/comparators/test_json.py b/tests/comparators/test_json.py
index 7c09b42..26ea110 100644
--- a/tests/comparators/test_json.py
+++ b/tests/comparators/test_json.py
@@ -21,7 +21,7 @@ import pytest
 
 from diffoscope.comparators.json import JSONFile
 
-from utils import data, load_fixture
+from utils import data, load_fixture, assert_non_existing
 
 json1 = load_fixture(data('test1.json'))
 json2 = load_fixture(data('test2.json'))
@@ -40,3 +40,6 @@ def test_diff(differences):
     with open(data('json_expected_diff')) as f:
         expected_diff = f.read()
     assert differences[0].unified_diff == expected_diff
+
+def test_compare_non_existing(monkeypatch, json1):
+    assert_non_existing(monkeypatch, json1)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list