You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
231 B
16 lines
231 B
# tests that import only sets subpackage attribute on first import
|
|
|
|
import pkg9
|
|
|
|
pkg9.mod1()
|
|
pkg9.mod2()
|
|
|
|
import pkg9.mod1
|
|
|
|
pkg9.mod1()
|
|
pkg9.mod2()
|
|
|
|
import pkg9.mod2
|
|
|
|
pkg9.mod1()
|
|
print(pkg9.mod2.__name__, type(pkg9.mod2).__name__)
|
|
|