Skip to content

Commit 7713f29

Browse files
committed
TST: small adjustments for pytest
1 parent ab8822a commit 7713f29

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

doc/source/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ Or with one of the following constructs::
613613

614614
For more, see the `pytest<http://doc.pytest.org/en/latest/>`_ documentation.
615615

616-
.. versionadded:: 0.18.0
616+
.. versionadded:: 0.20.0
617617

618618
Furthermore one can run
619619

pandas/util/_tester.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ def test():
1313
raise ImportError("Need pytest>=3.0 to run tests")
1414
else:
1515
def test(extra_args=None):
16+
cmd = ['--skip-slow', '--skip-network']
1617
if extra_args:
17-
cmd = ['-q'] + extra_args + [PKG]
18-
else:
19-
cmd = ['-q', PKG]
18+
if not isinstance(extra_args, list):
19+
extra_args = [extra_args]
20+
cmd = extra_args
21+
cmd += [PKG]
22+
print("running: pytest {}".format(' '.join(cmd)))
2023
pytest.main(cmd)
2124

2225

pandas/util/testing.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from distutils.version import LooseVersion
2020

2121
from numpy.random import randn, rand
22-
# from numpy.testing.decorators import slow # noqa
2322
import pytest
2423
import numpy as np
2524

@@ -50,6 +49,8 @@
5049
from pandas.util.decorators import deprecate
5150
from pandas import _testing
5251
from pandas.io.common import urlopen
52+
slow = pytest.mark.slow
53+
5354

5455
N = 30
5556
K = 4
@@ -2550,9 +2551,6 @@ def assert_produces_warning(expected_warning=Warning, filter_level="always",
25502551
% extra_warnings)
25512552

25522553

2553-
slow = pytest.mark.slow
2554-
2555-
25562554
class RNGContext(object):
25572555
"""
25582556
Context manager to set the numpy random number generator speed. Returns

0 commit comments

Comments
 (0)