[test] Remove redundancy from lambda expected value regex
authordirkf <fieldhouse@gmx.net>
Sun, 3 Sep 2023 00:13:40 +0000 (01:13 +0100)
committerdirkf <fieldhouse@gmx.net>
Sun, 3 Sep 2023 00:13:40 +0000 (01:13 +0100)
test/helper.py

index fc55c6b461c0d3f00f658c76ad51f717a4c9338a..5b7e3dfe20be7100897903776f09d4aea99b25f8 100644 (file)
@@ -142,7 +142,7 @@ def expect_value(self, got, expected, field):
         self.assertTrue(
             contains_str in got,
             'field %s (value: %r) should contain %r' % (field, got, contains_str))
-    elif isinstance(expected, compat_str) and re.match(r'^lambda \w+:', expected):
+    elif isinstance(expected, compat_str) and re.match(r'lambda \w+:', expected):
         fn = eval(expected)
         suite = expected.split(':', 1)[1].strip()
         self.assertTrue(