Skip to content

Commit 84d9538

Browse files
Refactor display-utils boundary inventory derivation
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent d15e13c commit 84d9538

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

tests/test_display_utils_import_boundary.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
import pytest
44

5+
from tests.test_display_helper_usage import (
6+
ALLOWED_KEY_FORMAT_CALL_FILES,
7+
ALLOWED_NORMALIZE_DISPLAY_CALL_FILES,
8+
)
9+
510
pytestmark = pytest.mark.architecture
611

712

8-
EXPECTED_DISPLAY_UTILS_IMPORTERS = (
9-
"hyperbrowser/client/managers/extension_utils.py",
10-
"hyperbrowser/client/managers/response_utils.py",
11-
"hyperbrowser/client/managers/session_utils.py",
12-
"hyperbrowser/tools/__init__.py",
13-
"hyperbrowser/transport/base.py",
13+
EXPECTED_EXTRA_IMPORTERS = (
1414
"tests/test_display_utils.py",
1515
"tests/test_display_utils_import_boundary.py",
1616
)
@@ -31,4 +31,13 @@ def test_display_utils_imports_are_centralized():
3131
continue
3232
discovered_modules.append(module_path.as_posix())
3333

34-
assert discovered_modules == list(EXPECTED_DISPLAY_UTILS_IMPORTERS)
34+
expected_runtime_modules = sorted(
35+
f"hyperbrowser/{path.as_posix()}"
36+
for path in {
37+
*ALLOWED_KEY_FORMAT_CALL_FILES,
38+
*ALLOWED_NORMALIZE_DISPLAY_CALL_FILES,
39+
}
40+
if path != Path("display_utils.py")
41+
)
42+
expected_modules = sorted([*expected_runtime_modules, *EXPECTED_EXTRA_IMPORTERS])
43+
assert discovered_modules == expected_modules

0 commit comments

Comments
 (0)