File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,3 +21,21 @@ def test_imports_collect_function_sources_ignores_non_matching_imports():
2121 )
2222
2323 assert imports_collect_function_sources (module_text ) is False
24+
25+
26+ def test_imports_collect_function_sources_supports_aliased_import ():
27+ module_text = (
28+ "from tests.ast_function_source_utils import collect_function_sources as cfs\n "
29+ "cfs('tests/test_model_request_wrapper_internal_reuse.py')\n "
30+ )
31+
32+ assert imports_collect_function_sources (module_text ) is True
33+
34+
35+ def test_imports_collect_function_sources_ignores_non_from_imports ():
36+ module_text = (
37+ "import tests.ast_function_source_utils as source_utils\n "
38+ "source_utils.collect_function_sources('tests/test_web_request_wrapper_internal_reuse.py')\n "
39+ )
40+
41+ assert imports_collect_function_sources (module_text ) is False
You can’t perform that action at this time.
0 commit comments