From b8762af300ee7f3f77a208bc43211e9b609efbfa Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Sat, 7 Sep 2024 14:41:40 +0200 Subject: [PATCH] Move test to helpers --- test/test_traversal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_traversal.py b/test/test_traversal.py index 0cc967eaf..9179dadda 100644 --- a/test/test_traversal.py +++ b/test/test_traversal.py @@ -436,14 +436,14 @@ def test_traversal_filter(self): assert traverse_obj(data, [..., filter]) == [True, 1, 1.1, 'str', {0: 0}, [1]], \ '`filter` should filter falsy values' + +class TestTraversalHelpers: def test_traversal_require(self): with pytest.raises(ExtractorError): traverse_obj(_TEST_DATA, ['None', {require('value')}]) assert traverse_obj(_TEST_DATA, ['str', {require('value')}]) == 'str', \ '`require` should pass through non `None` values' - -class TestTraversalHelpers: def test_subs_list_to_dict(self): assert traverse_obj([ {'name': 'de', 'url': 'https://example.com/subs/de.vtt'},