blueloveTH 1 ano atrás
pai
commit
11f709b768
2 arquivos alterados com 6 adições e 2 exclusões
  1. 2 1
      tests/30_import.py
  2. 4 1
      tests/test2/a/g/__init__.py

+ 2 - 1
tests/30_import.py

@@ -10,8 +10,9 @@ import test1
 
 assert test1.add(1, 2) == 13
 
-from test2.a.g import get_value
+from test2.a.g import get_value, A
 assert get_value() == '123'
+assert (A.__module__ == 'test2.a.g'), A.__module__
 
 import test2
 assert test2.a.g.get_value() == '123'

+ 4 - 1
tests/test2/a/g/__init__.py

@@ -3,4 +3,7 @@ ok = True
 from ...utils import r
 
 def get_value():
-    return r.value
+    return r.value
+
+class A:
+    pass