mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 22:35:21 +00:00
[test] Remove redundancy from lambda expected value regex
This commit is contained in:
parent
31f50c8194
commit
21caaf2380
@ -142,7 +142,7 @@ def expect_value(self, got, expected, field):
|
|||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
contains_str in got,
|
contains_str in got,
|
||||||
'field %s (value: %r) should contain %r' % (field, got, contains_str))
|
'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)
|
fn = eval(expected)
|
||||||
suite = expected.split(':', 1)[1].strip()
|
suite = expected.split(':', 1)[1].strip()
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
|
Loading…
Reference in New Issue
Block a user