Skip to content

Commit fabdf47

Browse files
Simplify reload test
1 parent cfad34a commit fabdf47

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_experimental.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from importlib import import_module, reload
2+
from importlib import reload
33
from unittest import mock
44

55
import pytest
@@ -16,10 +16,7 @@ def test_missing_experimental_extra():
1616
with mock.patch.dict(sys.modules):
1717
sys.modules["numexpr"] = None
1818
with pytest.raises(ModuleNotFoundError):
19-
if "pyhf.experimental.modifiers" in sys.modules:
20-
reload(sys.modules["pyhf.experimental.modifiers"])
21-
else:
22-
import_module("pyhf.experimental.modifiers")
19+
reload(sys.modules["pyhf.experimental.modifiers"])
2320

2421

2522
def test_add_custom_modifier(backend):

0 commit comments

Comments
 (0)