Skip to content

Commit 3c582bc

Browse files
committed
tests/import: Add test for compiling "import a.b as c".
1 parent 216a711 commit 3c582bc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/import/import_pkg1.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@
99
print(pkg_ is not pkg.mod)
1010
print(pkg_ is pkg)
1111
print(pkg_.mod is pkg.mod)
12+
13+
# import using "as"
14+
import pkg.mod as mm
15+
print(mm is pkg.mod)
16+
print(mm.foo())

0 commit comments

Comments
 (0)