Report duplicate keys in check_json

Raise ValueError and return 1 if json contains duplicate keys
This commit is contained in:
Aditya Khursale 2021-02-17 02:08:57 +05:30 committed by Anthony Sottile
parent 11a2fdbab8
commit fe37451719
3 changed files with 22 additions and 1 deletions

View file

@ -9,6 +9,7 @@ from testing.util import get_resource_path
('bad_json.notjson', 1),
('bad_json_latin1.nonjson', 1),
('ok_json.json', 0),
('duplicate_key_json.json', 1),
),
)
def test_main(capsys, filename, expected_retval):