File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -60,3 +60,21 @@ def test_imports_imports_collect_function_sources_ignores_non_matching_imports()
6060 )
6161
6262 assert imports_imports_collect_function_sources (module_text ) is False
63+
64+
65+ def test_imports_imports_collect_function_sources_supports_aliased_import ():
66+ module_text = (
67+ "from tests.ast_import_utils import imports_collect_function_sources as helper\n "
68+ "helper('dummy')\n "
69+ )
70+
71+ assert imports_imports_collect_function_sources (module_text ) is True
72+
73+
74+ def test_imports_imports_collect_function_sources_ignores_non_from_imports ():
75+ module_text = (
76+ "import tests.ast_import_utils as import_utils\n "
77+ "import_utils.imports_collect_function_sources('dummy')\n "
78+ )
79+
80+ assert imports_imports_collect_function_sources (module_text ) is False
You can’t perform that action at this time.
0 commit comments