Merged in kidmose/pywhois/feature/fix-test_parser-keys_to_test (pull request #34)
authorRichard <richardbp@gmail.com>
Tue, 22 May 2018 15:10:43 +0000
changeset 180 08cfbab35d0b
parent 178 06e9b88e0c20 (current diff)
parent 179 2fb992c480e4 (diff)
child 181 71c105a37bc1
child 182 515531068842
child 183 0ab7f8a39d9b
Merged in kidmose/pywhois/feature/fix-test_parser-keys_to_test (pull request #34) test_parser.py: Respect keys_to_test/Fix error in 7bec7a730d69
--- a/test/test_parser.py	Tue May 22 11:09:53 2018 -0400
+++ b/test/test_parser.py	Tue May 22 15:10:43 2018 +0000
@@ -85,7 +85,10 @@
                 expected_results = json.load(infil)
 
             # Compare each key
-            for key in set(results).union(set(expected_results)):
+            compare_keys = set.union(set(results), set(expected_results))
+            if keys_to_test is not None:
+                compare_keys = compare_keys.intersection(set(keys_to_test))
+            for key in compare_keys:
                 total += 1
                 if key not in results:
                     print("%s \t(%s):\t Missing in results" % (domain, key,))