22
33import pytest
44
5+ from tests .test_display_helper_usage import (
6+ ALLOWED_KEY_FORMAT_CALL_FILES ,
7+ ALLOWED_NORMALIZE_DISPLAY_CALL_FILES ,
8+ )
9+
510pytestmark = 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