Skip to content

Commit a83410b

Browse files
Refactor call-helper boundary inventory composition
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 7452b1d commit a83410b

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

‎tests/test_ast_call_symbol_helper_import_boundary.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
import pytest
44

55
from tests.ast_import_utils import imports_symbol_from_module
6+
from tests.test_ast_call_symbol_helper_usage import AST_CALL_SYMBOL_GUARD_MODULES
67

78
pytestmark = pytest.mark.architecture
89

910

10-
EXPECTED_CALLS_SYMBOL_IMPORTERS = (
11+
EXPECTED_EXTRA_IMPORTERS = (
1112
"tests/test_ast_call_symbol_helper_usage.py",
12-
"tests/test_ast_function_source_helper_usage.py",
13-
"tests/test_ast_import_helper_usage.py",
1413
"tests/test_ast_import_utils.py",
15-
"tests/test_ast_module_import_helper_usage.py",
16-
"tests/test_ast_symbol_import_helper_usage.py",
1714
)
1815

1916

@@ -29,4 +26,5 @@ def test_calls_symbol_imports_are_centralized():
2926
continue
3027
discovered_modules.append(module_path.as_posix())
3128

32-
assert discovered_modules == list(EXPECTED_CALLS_SYMBOL_IMPORTERS)
29+
expected_modules = sorted([*AST_CALL_SYMBOL_GUARD_MODULES, *EXPECTED_EXTRA_IMPORTERS])
30+
assert discovered_modules == expected_modules

‎tests/test_ast_import_utils_module_import_boundary.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import pytest
44

55
from tests.ast_import_utils import imports_from_module
6-
from tests.test_ast_call_symbol_helper_import_boundary import (
7-
EXPECTED_CALLS_SYMBOL_IMPORTERS,
8-
)
6+
from tests.test_ast_call_symbol_helper_usage import AST_CALL_SYMBOL_GUARD_MODULES
97
from tests.test_ast_import_helper_secondary_import_boundary import (
108
EXPECTED_SECONDARY_AST_IMPORT_HELPER_IMPORTERS,
119
)
@@ -39,7 +37,7 @@ def test_ast_import_utils_imports_are_centralized():
3937
expected_modules = sorted(
4038
{
4139
*AST_IMPORT_GUARD_MODULES,
42-
*EXPECTED_CALLS_SYMBOL_IMPORTERS,
40+
*AST_CALL_SYMBOL_GUARD_MODULES,
4341
*EXPECTED_SECONDARY_AST_IMPORT_HELPER_IMPORTERS,
4442
*EXPECTED_EXTRA_IMPORTERS,
4543
}

0 commit comments

Comments
 (0)