File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -263,14 +263,14 @@ def test_initpkg_not_transfers_not_existing_attrs(monkeypatch):
263
263
mod = ModuleType ('hello' )
264
264
mod .__file__ = "hello.py"
265
265
assert not hasattr (mod , '__path__' )
266
- assert not hasattr (mod , '__package__' )
266
+ assert not hasattr (mod , '__package__' ) or mod . __package__ is None
267
267
monkeypatch .setitem (sys .modules , 'hello' , mod )
268
268
apipkg .initpkg ('hello' , {})
269
269
newmod = sys .modules ['hello' ]
270
270
assert newmod != mod
271
271
assert newmod .__file__ == py .path .local (mod .__file__ )
272
272
assert not hasattr (newmod , '__path__' )
273
- assert not hasattr (newmod , '__package__' )
273
+ assert not hasattr (newmod , '__package__' ) or mod . __package__ is None
274
274
275
275
276
276
def test_initpkg_not_changing_jython_paths (monkeypatch ):
You can’t perform that action at this time.
0 commit comments