aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_results.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-05-05 01:19:04 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-05-05 01:19:04 -0400
commit2486bca7db446271312f1fc0f46b032154c65f1b (patch)
tree86deb50b258b2dab02936802b79d1af7e3c254ab /test/test_results.py
parentf98d637baa18530edb64e5f71bb9feefbd9e80b4 (diff)
parentc679cd7a13bdbf6896e53d68fe2093910bc6625a (diff)
Update upstream source from tag 'upstream/1.29.6'
Update to upstream version '1.29.6' with Debian dir fb955c7c635591b07c8b52773c233ca312089e7a
Diffstat (limited to 'test/test_results.py')
-rw-r--r--test/test_results.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test_results.py b/test/test_results.py
index 28db6c3..6e04e1d 100644
--- a/test/test_results.py
+++ b/test/test_results.py
@@ -239,7 +239,11 @@ class TestExtractorResults(unittest.TestCase):
key = key[1:]
if key not in kwdict:
continue
+
path = "{}.{}".format(parent, key) if parent else key
+ if key.startswith("!"):
+ self.assertNotIn(key[1:], kwdict, msg=path)
+ continue
self.assertIn(key, kwdict, msg=path)
value = kwdict[key]
@@ -272,8 +276,11 @@ class TestExtractorResults(unittest.TestCase):
elif test.startswith("type:"):
self.assertEqual(test[5:], type(value).__name__, msg=path)
elif test.startswith("len:"):
- self.assertIsInstance(value, (list, tuple), msg=path)
- self.assertEqual(int(test[4:]), len(value), msg=path)
+ cls, _, length = test[4:].rpartition(":")
+ if cls:
+ self.assertEqual(
+ cls, type(value).__name__, msg=path + "/type")
+ self.assertEqual(int(length), len(value), msg=path)
else:
self.assertEqual(test, value, msg=path)
else: