@@ -70,23 +70,23 @@ def setup_method(self, *args):
70
70
sys .modules .pop (modname , None )
71
71
72
72
def test_realmodule (self ):
73
- import realtest .x
73
+ import realtest .x # type: ignore
74
74
75
75
assert "realtest.x.module" in sys .modules
76
76
assert getattr (realtest .x .module , "mytest0" )
77
77
78
78
def test_realmodule_repr (self ):
79
- import realtest .x
79
+ import realtest .x # type: ignore
80
80
81
81
assert "<ApiModule 'realtest.x'>" == repr (realtest .x )
82
82
83
83
def test_realmodule_from (self ):
84
- from realtest .x import module
84
+ from realtest .x import module # type: ignore
85
85
86
86
assert getattr (module , "mytest1" )
87
87
88
88
def test_realmodule__all__ (self ):
89
- import realtest .x .module
89
+ import realtest .x .module # type: ignore
90
90
91
91
assert realtest .x .__all__ == ["module" ]
92
92
assert len (realtest .x .module .__all__ ) == 4
@@ -770,8 +770,8 @@ def doit():
770
770
)
771
771
772
772
monkeypatch .syspath_prepend (tmpdir )
773
- import aliasmodule_proxy as orig
774
- from my_aliasmodule_proxy import proxy
773
+ import aliasmodule_proxy as orig # type: ignore
774
+ from my_aliasmodule_proxy import proxy # type: ignore
775
775
776
776
doit = proxy .doit
777
777
assert doit is orig .doit
@@ -811,20 +811,20 @@ def test_aliasmodule_nested_import_with_from(tmpdir, monkeypatch):
811
811
)
812
812
)
813
813
monkeypatch .syspath_prepend (tmpdir )
814
- from api1 import os2
815
- from api1 .os2 .path import abspath
814
+ from api1 import os2 # type: ignore
815
+ from api1 .os2 .path import abspath # type: ignore
816
816
817
817
assert abspath == os .path .abspath
818
818
# check that api1.os2 mirrors os.*
819
819
assert os2 .x == 3
820
- import api1
820
+ import api1 # type: ignore
821
821
822
822
assert "os2.path" not in api1 .__dict__
823
823
824
824
825
825
def test_initpkg_without_old_module ():
826
826
apipkg .initpkg ("initpkg_without_old_module" , dict (modules = "sys:modules" ))
827
- from initpkg_without_old_module import modules
827
+ from initpkg_without_old_module import modules # type: ignore
828
828
829
829
assert modules is sys .modules
830
830
0 commit comments