Skip to content

Commit

Permalink
naming consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Jul 29, 2022
1 parent 23019d8 commit cad7957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_hdfio.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def pyhdf_missing(monkeypatch):

blocked_imports = {"pyhdf", "pyhdf.SD"}

def wrapped_import(name, *args, **kwargs):
def wrapped_dunder_import(name, *args, **kwargs):
if name in blocked_imports:
raise ImportError(f"Mocked import error for {name!r}")
return real_dunder_import(name, *args, **kwargs)
Expand All @@ -77,7 +77,7 @@ def wrapped_importlib_import(name, *args, **kwargs):
for mod in blocked_imports:
monkeypatch.delitem(sys.modules, mod, raising=False)
monkeypatch.delitem(sys.modules, "monetio.sat.hdfio", raising=False) # important!
monkeypatch.setattr(builtins, "__import__", wrapped_import)
monkeypatch.setattr(builtins, "__import__", wrapped_dunder_import)
monkeypatch.setattr(importlib, "import_module", wrapped_importlib_import)


Expand Down

0 comments on commit cad7957

Please sign in to comment.