Skip to content

Commit 42ac558

Browse files
committed
Update test to use builtin lib stable over python versions
1 parent 9e4d365 commit 42ac558

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lazy_loader/tests/test_lazy_loader.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def test_lazy_import_basics():
3030

3131
def test_lazy_import_subpackages():
3232
with pytest.warns(RuntimeWarning):
33-
ctextpad = lazy.load("curses.textpad")
34-
assert "curses" in sys.modules
35-
assert type(sys.modules["curses"]) == type(pytest)
36-
assert isinstance(ctextpad, importlib.util._LazyModule)
37-
assert "curses.textpad" in sys.modules
38-
assert sys.modules["curses.textpad"] == ctextpad
33+
hp = lazy.load("html.parser")
34+
assert "html" in sys.modules
35+
assert type(sys.modules["html"]) == type(pytest)
36+
assert isinstance(hp, importlib.util._LazyModule)
37+
assert "html.parser" in sys.modules
38+
assert sys.modules["html.parser"] == hp
3939

4040

4141
def test_lazy_import_impact_on_sys_modules():

0 commit comments

Comments
 (0)