File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 33
44import pytest
55
6+ from tests .test_safe_key_display_helper_usage import ALLOWED_SAFE_KEY_DISPLAY_CALL_FILES
7+
68pytestmark = pytest .mark .architecture
79
810
9- EXPECTED_SAFE_KEY_DISPLAY_IMPORTERS = (
10- "hyperbrowser/client/managers/list_parsing_utils.py" ,
11- "tests/test_mapping_utils.py" ,
12- )
11+ EXPECTED_SAFE_KEY_DISPLAY_EXTRA_IMPORTERS = ("tests/test_mapping_utils.py" ,)
1312
1413
1514def _imports_safe_key_display_helper (module_text : str ) -> bool :
@@ -37,4 +36,12 @@ def test_safe_key_display_helper_imports_are_centralized():
3736 if _imports_safe_key_display_helper (module_text ):
3837 discovered_modules .append (module_path .as_posix ())
3938
40- assert discovered_modules == list (EXPECTED_SAFE_KEY_DISPLAY_IMPORTERS )
39+ expected_runtime_modules = sorted (
40+ f"hyperbrowser/{ path .as_posix ()} "
41+ for path in ALLOWED_SAFE_KEY_DISPLAY_CALL_FILES
42+ if path != Path ("mapping_utils.py" )
43+ )
44+ expected_modules = sorted (
45+ [* expected_runtime_modules , * EXPECTED_SAFE_KEY_DISPLAY_EXTRA_IMPORTERS ]
46+ )
47+ assert discovered_modules == expected_modules
You can’t perform that action at this time.
0 commit comments