Skip to content

Commit

Permalink
TST: small adjustments for pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Feb 10, 2017
1 parent ab8822a commit 7713f29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ Or with one of the following constructs::

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

.. versionadded:: 0.18.0
.. versionadded:: 0.20.0

Furthermore one can run

Expand Down
9 changes: 6 additions & 3 deletions pandas/util/_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ def test():
raise ImportError("Need pytest>=3.0 to run tests")
else:
def test(extra_args=None):
cmd = ['--skip-slow', '--skip-network']
if extra_args:
cmd = ['-q'] + extra_args + [PKG]
else:
cmd = ['-q', PKG]
if not isinstance(extra_args, list):
extra_args = [extra_args]
cmd = extra_args
cmd += [PKG]
print("running: pytest {}".format(' '.join(cmd)))
pytest.main(cmd)


Expand Down
6 changes: 2 additions & 4 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from distutils.version import LooseVersion

from numpy.random import randn, rand
# from numpy.testing.decorators import slow # noqa
import pytest
import numpy as np

Expand Down Expand Up @@ -50,6 +49,8 @@
from pandas.util.decorators import deprecate
from pandas import _testing
from pandas.io.common import urlopen
slow = pytest.mark.slow


N = 30
K = 4
Expand Down Expand Up @@ -2550,9 +2551,6 @@ def assert_produces_warning(expected_warning=Warning, filter_level="always",
% extra_warnings)


slow = pytest.mark.slow


class RNGContext(object):
"""
Context manager to set the numpy random number generator speed. Returns
Expand Down

0 comments on commit 7713f29

Please sign in to comment.