Skip to content

Commit 7703f85

Browse files
Refactor open-error import boundary inventory derivation
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent ee8b831 commit 7703f85

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/test_file_open_error_helper_import_boundary.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33

44
import pytest
55

6+
from tests.test_file_open_error_helper_usage import OPEN_ERROR_HELPER_MODULES
7+
68
pytestmark = pytest.mark.architecture
79

810

9-
EXPECTED_OPEN_ERROR_HELPER_IMPORTERS = (
10-
"hyperbrowser/client/managers/async_manager/extension.py",
11-
"hyperbrowser/client/managers/session_upload_utils.py",
12-
"hyperbrowser/client/managers/sync_manager/extension.py",
13-
"tests/test_file_utils.py",
14-
)
11+
EXPECTED_EXTRA_IMPORTERS = ("tests/test_file_utils.py",)
1512

1613

1714
def _imports_open_error_helper(module_text: str) -> bool:
@@ -37,4 +34,7 @@ def test_build_open_file_error_message_imports_are_centralized():
3734
if _imports_open_error_helper(module_text):
3835
discovered_modules.append(module_path.as_posix())
3936

40-
assert discovered_modules == list(EXPECTED_OPEN_ERROR_HELPER_IMPORTERS)
37+
expected_modules = sorted(
38+
[*(module_path for module_path, _ in OPEN_ERROR_HELPER_MODULES), *EXPECTED_EXTRA_IMPORTERS]
39+
)
40+
assert discovered_modules == expected_modules

0 commit comments

Comments
 (0)