We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54e71a7 commit 1a75f49Copy full SHA for 1a75f49
pandas/conftest.py
@@ -1,5 +1,8 @@
1
import pytest
2
3
+import numpy
4
+import pandas
5
+
6
7
def pytest_addoption(parser):
8
parser.addoption("--skip-slow", action="store_true",
@@ -19,3 +22,11 @@ def pytest_runtest_setup(item):
19
22
20
23
if 'network' in item.keywords and item.config.getoption("--skip-network"):
21
24
pytest.skip("skipping due to --skip-network")
25
26
27
+# For running doctests: make np and pd names available
28
29
+@pytest.fixture(autouse=True)
30
+def add_imports(doctest_namespace):
31
+ doctest_namespace['np'] = numpy
32
+ doctest_namespace['pd'] = pandas
0 commit comments