This commit is contained in:
BLUELOVETH 2023-08-28 13:40:39 +08:00
parent 966c58d808
commit 289ddab5f7
7 changed files with 15 additions and 4 deletions

View File

@ -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

View File

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

View File

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

View File

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

3
tests/test3/__init__.py Normal file
View File

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

View File

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

1
tests/test3/a/b.py Normal file
View File

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