import pytest


def pytest_addoption(parser):
    parser.addoption("--skip-slow", action="store_true",
                     help="skip slow tests")
    parser.addoption("--skip-network", action="store_true",
                     help="run network tests")
    parser.addoption("--only-slow", action="store_true",
                     help="run only slow tests")


def pytest_runtest_setup(item):
    if 'slow' in item.keywords and item.config.getoption("--skip-slow"):
        pytest.skip("skipping due to --skip-slow")

    if 'slow' not in item.keywords and item.config.getoption("--only-slow"):
        pytest.skip("skipping due to --only-slow")

    if 'network' in item.keywords and item.config.getoption("--skip-network"):
        pytest.skip("skipping due to --skip-network")

@@ -8,16 +8,44 @@
 pytest%0A%0A
+import numpy%0Aimport pandas%0A%0A
 %0Adef pyt
@@ -803,8 +803,205 @@
 twork%22)%0A
+%0A%0A# For running doctests: make np and pd names available%0A%0A@pytest.fixture(autouse=True)%0Adef add_imports(doctest_namespace):%0A    doctest_namespace%5B'np'%5D = numpy%0A    doctest_namespace%5B'pd'%5D = pandas%0A

make it possible to run doctests (#15626)