From: dirkf Date: Sun, 3 Sep 2023 00:13:40 +0000 (+0100) Subject: [test] Remove redundancy from lambda expected value regex X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=21caaf23800c95451cec27dfac56df2c0f8de85a;p=youtube-dl [test] Remove redundancy from lambda expected value regex --- diff --git a/test/helper.py b/test/helper.py index fc55c6b46..5b7e3dfe2 100644 --- a/test/helper.py +++ b/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(