diff --git a/tests/test_pipdeptree.py b/tests/test_pipdeptree.py index 0c0e8c0..c621f9e 100644 --- a/tests/test_pipdeptree.py +++ b/tests/test_pipdeptree.py @@ -151,9 +151,10 @@ def test_render_json(capsys): def test_render_json_tree(): + ignore_pkgs = {'pip', 'pipdeptree', 'setuptools', 'wheel'} output = render_json_tree(tree, indent=4) - data = json.loads(output) - assert 9 == len(data) + data = [d for d in json.loads(output) if d['key'] not in ignore_pkgs] + assert 7 == len(data) matching_pkgs = [p for p in data if p['key'] == 'flask-script'] assert matching_pkgs