Skip to content

Commit 6989bb5

Browse files
Refactor AST import-utils boundary expected inventory
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 8417587 commit 6989bb5

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

tests/test_ast_import_utils_module_import_boundary.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
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+
)
9+
from tests.test_ast_import_helper_secondary_import_boundary import (
10+
EXPECTED_SECONDARY_AST_IMPORT_HELPER_IMPORTERS,
11+
)
12+
from tests.test_ast_import_helper_usage import AST_IMPORT_GUARD_MODULES
613

714
pytestmark = pytest.mark.architecture
815

916

10-
EXPECTED_AST_IMPORT_UTILS_IMPORTERS = (
17+
EXPECTED_EXTRA_IMPORTERS = (
1118
"tests/test_ast_call_symbol_helper_import_boundary.py",
12-
"tests/test_ast_function_source_helper_usage.py",
13-
"tests/test_ast_function_source_import_boundary.py",
1419
"tests/test_ast_import_helper_import_boundary.py",
1520
"tests/test_ast_import_helper_secondary_import_boundary.py",
16-
"tests/test_ast_import_helper_usage.py",
1721
"tests/test_ast_import_utils.py",
1822
"tests/test_ast_import_utils_module_import_boundary.py",
1923
)
@@ -27,4 +31,12 @@ def test_ast_import_utils_imports_are_centralized():
2731
continue
2832
discovered_modules.append(module_path.as_posix())
2933

30-
assert discovered_modules == list(EXPECTED_AST_IMPORT_UTILS_IMPORTERS)
34+
expected_modules = sorted(
35+
{
36+
*AST_IMPORT_GUARD_MODULES,
37+
*EXPECTED_CALLS_SYMBOL_IMPORTERS,
38+
*EXPECTED_SECONDARY_AST_IMPORT_HELPER_IMPORTERS,
39+
*EXPECTED_EXTRA_IMPORTERS,
40+
}
41+
)
42+
assert discovered_modules == expected_modules

0 commit comments

Comments
 (0)