Explorar o código

[test] Remove redundancy from lambda expected value regex

dirkf %!s(int64=2) %!d(string=hai) anos
pai
achega
21caaf2380
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      test/helper.py

+ 1 - 1
test/helper.py

@@ -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(