BLUELOVETH %!s(int64=2) %!d(string=hai) anos
pai
achega
289ddab5f7

+ 5 - 1
tests/30_import.py

@@ -14,4 +14,8 @@ import test2
 assert test2.a.g.get_value() == '123'
 
 from test2.utils import get_value_2
-assert get_value_2() == '123'
+assert get_value_2() == '123'
+
+from test3.a.b import value
+# should test3
+assert value == 1

+ 0 - 2
tests/test2/a/__init__.py

@@ -1,3 +1 @@
-ok = True
-
 from ..b import D

+ 2 - 0
tests/test2/a/g/__init__.py

@@ -1,3 +1,5 @@
+ok = True
+
 from ...utils import r
 
 def get_value():

+ 1 - 1
tests/test2/utils/r.py

@@ -1,4 +1,4 @@
 value = '123'
 
 from test2.a import g
-assert g.ok == True
+assert g.ok

+ 3 - 0
tests/test3/__init__.py

@@ -0,0 +1,3 @@
+raise ValueError(
+    "test3 should not be imported"
+)

+ 3 - 0
tests/test3/a/__init__.py

@@ -0,0 +1,3 @@
+raise ValueError(
+    "test3.a should not be imported"
+)

+ 1 - 0
tests/test3/a/b.py

@@ -0,0 +1 @@
+value = 1