Skip to content

Commit af62be9

Browse files
Refactor list parsing boundary inventory derivation
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 1c79545 commit af62be9

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

tests/test_list_parsing_helpers_import_boundary.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
import pytest
44

5+
from tests.test_list_parsing_helper_usage import (
6+
ALLOWED_PARSE_MAPPING_LIST_CALL_FILES,
7+
ALLOWED_READ_PLAIN_LIST_CALL_FILES,
8+
)
9+
510
pytestmark = pytest.mark.architecture
611

712

8-
EXPECTED_LIST_PARSING_HELPER_IMPORTERS = (
9-
"hyperbrowser/client/managers/extension_utils.py",
10-
"hyperbrowser/client/managers/session_utils.py",
13+
EXPECTED_LIST_PARSING_EXTRA_IMPORTERS = (
1114
"tests/test_list_parsing_helpers_import_boundary.py",
1215
"tests/test_list_parsing_utils.py",
1316
)
@@ -28,4 +31,15 @@ def test_list_parsing_helper_imports_are_centralized():
2831
continue
2932
discovered_modules.append(module_path.as_posix())
3033

31-
assert discovered_modules == list(EXPECTED_LIST_PARSING_HELPER_IMPORTERS)
34+
expected_runtime_modules = sorted(
35+
f"hyperbrowser/{path.as_posix()}"
36+
for path in {
37+
*ALLOWED_PARSE_MAPPING_LIST_CALL_FILES,
38+
*ALLOWED_READ_PLAIN_LIST_CALL_FILES,
39+
}
40+
if path != Path("client/managers/list_parsing_utils.py")
41+
)
42+
expected_modules = sorted(
43+
[*expected_runtime_modules, *EXPECTED_LIST_PARSING_EXTRA_IMPORTERS]
44+
)
45+
assert discovered_modules == expected_modules

0 commit comments

Comments
 (0)