33
44import pytest
55
6+ from tests .test_ast_function_source_helper_usage import (
7+ AST_FUNCTION_SOURCE_GUARD_MODULES ,
8+ )
9+
610pytestmark = pytest .mark .architecture
711
812
9- EXPECTED_AST_FUNCTION_SOURCE_IMPORTER_MODULES = (
10- "tests/test_agent_request_wrapper_internal_reuse.py" ,
11- "tests/test_ast_function_source_utils.py" ,
12- "tests/test_extension_request_function_parse_boundary.py" ,
13- "tests/test_job_request_route_builder_internal_reuse.py" ,
14- "tests/test_job_request_wrapper_internal_reuse.py" ,
15- "tests/test_model_request_function_parse_boundary.py" ,
16- "tests/test_model_request_function_transport_boundary.py" ,
17- "tests/test_model_request_wrapper_internal_reuse.py" ,
18- "tests/test_request_wrapper_internal_reuse.py" ,
19- "tests/test_session_recordings_follow_redirects_boundary.py" ,
20- "tests/test_session_request_function_parse_boundary.py" ,
21- "tests/test_session_request_wrapper_internal_reuse.py" ,
22- "tests/test_session_resource_wrapper_internal_reuse.py" ,
23- "tests/test_web_request_wrapper_internal_reuse.py" ,
24- )
13+ EXPECTED_EXTRA_IMPORTER_MODULES = ("tests/test_ast_function_source_utils.py" ,)
2514
2615def _imports_collect_function_sources (module_text : str ) -> bool :
2716 module_ast = ast .parse (module_text )
@@ -43,4 +32,7 @@ def test_ast_function_source_helper_imports_are_centralized():
4332 continue
4433 discovered_modules .append (module_path .as_posix ())
4534
46- assert discovered_modules == list (EXPECTED_AST_FUNCTION_SOURCE_IMPORTER_MODULES )
35+ expected_modules = sorted (
36+ [* AST_FUNCTION_SOURCE_GUARD_MODULES , * EXPECTED_EXTRA_IMPORTER_MODULES ]
37+ )
38+ assert discovered_modules == expected_modules
0 commit comments