[tests/results] ensure 're:' input is a string

This commit is contained in:
Mike Fährmann
2025-08-12 22:07:33 +02:00
parent 116999fc92
commit 06f37e1d8c

View File

@@ -324,6 +324,7 @@ class TestExtractorResults(unittest.TestCase):
self.assertEqual(test, value, msg=path)
elif isinstance(test, str):
if test.startswith("re:"):
self.assertIsInstance(value, str, msg=path)
self.assertRegex(value, test[3:], msg=path)
elif test.startswith("dt:"):
self.assertIsInstance(value, datetime.datetime, msg=path)