Skip to content

Commit 9ed3d3d

Browse files
committed
docs/conf.py: simplify mocking
1 parent f8f5bdc commit 9ed3d3d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

docs/conf.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,12 @@
1111
import sys
1212
from unittest.mock import MagicMock
1313

14-
15-
class _Mock(MagicMock):
16-
@classmethod
17-
def __getattr__(cls, name):
18-
return MagicMock()
19-
20-
2114
MOCK_MODULES = [
2215
"lxml",
2316
"numpy",
2417
]
2518

26-
sys.modules.update((mod_name, _Mock()) for mod_name in MOCK_MODULES)
19+
sys.modules.update((module, MagicMock()) for module in MOCK_MODULES)
2720
sys.path.insert(0, os.path.abspath('../'))
2821

2922

0 commit comments

Comments
 (0)