File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 33
44import pytest
55
6+ from tests .test_mapping_helpers_usage import ALLOWED_COPY_VALUES_CALL_FILES
67from tests .test_mapping_utils_import_boundary import EXPECTED_MAPPING_EXTRA_IMPORTERS
7- from tests .test_tool_mapping_reader_usage import TOOLS_MODULE
88
99pytestmark = pytest .mark .architecture
1010
@@ -34,7 +34,12 @@ def test_copy_mapping_values_by_string_keys_imports_are_centralized():
3434 if _imports_copy_mapping_values_by_string_keys (module_text ):
3535 discovered_modules .append (module_path .as_posix ())
3636
37+ expected_runtime_modules = sorted (
38+ f"hyperbrowser/{ path .as_posix ()} "
39+ for path in ALLOWED_COPY_VALUES_CALL_FILES
40+ if path != Path ("mapping_utils.py" )
41+ )
3742 expected_modules = sorted (
38- [TOOLS_MODULE . as_posix () , * EXPECTED_MAPPING_EXTRA_IMPORTERS ]
43+ [* expected_runtime_modules , * EXPECTED_MAPPING_EXTRA_IMPORTERS ]
3944 )
4045 assert discovered_modules == expected_modules
Original file line number Diff line number Diff line change 33
44import pytest
55
6+ from tests .test_mapping_helpers_usage import ALLOWED_READ_KEYS_CALL_FILES
67from tests .test_mapping_utils_import_boundary import EXPECTED_MAPPING_EXTRA_IMPORTERS
7- from tests .test_tool_mapping_reader_usage import TOOLS_MODULE
88
99pytestmark = pytest .mark .architecture
1010
@@ -34,7 +34,12 @@ def test_read_string_mapping_keys_imports_are_centralized():
3434 if _imports_read_string_mapping_keys (module_text ):
3535 discovered_modules .append (module_path .as_posix ())
3636
37+ expected_runtime_modules = sorted (
38+ f"hyperbrowser/{ path .as_posix ()} "
39+ for path in ALLOWED_READ_KEYS_CALL_FILES
40+ if path != Path ("mapping_utils.py" )
41+ )
3742 expected_modules = sorted (
38- [TOOLS_MODULE . as_posix () , * EXPECTED_MAPPING_EXTRA_IMPORTERS ]
43+ [* expected_runtime_modules , * EXPECTED_MAPPING_EXTRA_IMPORTERS ]
3944 )
4045 assert discovered_modules == expected_modules
You can’t perform that action at this time.
0 commit comments