22
33import pytest
44
5+ from tests .test_list_parsing_helper_usage import (
6+ ALLOWED_PARSE_MAPPING_LIST_CALL_FILES ,
7+ ALLOWED_READ_PLAIN_LIST_CALL_FILES ,
8+ )
9+
510pytestmark = pytest .mark .architecture
611
712
8- EXPECTED_LIST_PARSING_HELPER_IMPORTERS = (
9- "hyperbrowser/client/managers/extension_utils.py" ,
10- "hyperbrowser/client/managers/session_utils.py" ,
13+ EXPECTED_LIST_PARSING_EXTRA_IMPORTERS = (
1114 "tests/test_list_parsing_helpers_import_boundary.py" ,
1215 "tests/test_list_parsing_utils.py" ,
1316)
@@ -28,4 +31,15 @@ def test_list_parsing_helper_imports_are_centralized():
2831 continue
2932 discovered_modules .append (module_path .as_posix ())
3033
31- assert discovered_modules == list (EXPECTED_LIST_PARSING_HELPER_IMPORTERS )
34+ expected_runtime_modules = sorted (
35+ f"hyperbrowser/{ path .as_posix ()} "
36+ for path in {
37+ * ALLOWED_PARSE_MAPPING_LIST_CALL_FILES ,
38+ * ALLOWED_READ_PLAIN_LIST_CALL_FILES ,
39+ }
40+ if path != Path ("client/managers/list_parsing_utils.py" )
41+ )
42+ expected_modules = sorted (
43+ [* expected_runtime_modules , * EXPECTED_LIST_PARSING_EXTRA_IMPORTERS ]
44+ )
45+ assert discovered_modules == expected_modules
0 commit comments