Python: Add import resolution regression

This commit is contained in:
Rasmus Wriedt Larsen
2023-02-15 13:50:27 +01:00
parent e1ae3c3cfb
commit df6039d6cf
2 changed files with 12 additions and 0 deletions

View File

@@ -84,6 +84,12 @@ from attr_clash import clashing_attr, non_clashing_submodule #$ imports=attr_cla
check("clashing_attr", clashing_attr, "clashing_attr", globals()) #$ prints=clashing_attr SPURIOUS: prints="<module attr_clash.clashing_attr>"
check("non_clashing_submodule", non_clashing_submodule, "<module attr_clash.non_clashing_submodule>", globals()) #$ prints="<module attr_clash.non_clashing_submodule>"
# check that import * from an __init__ file works
from package.subpackage2 import *
check("subpackage2_attr", subpackage2_attr, "subpackage2_attr", globals()) #$ MISSING: prints=subpackage2_attr
exit(__file__)
print()

View File

@@ -0,0 +1,6 @@
from trace import *
enter(__file__)
subpackage2_attr = "subpackage2_attr"
exit(__file__)