Skip to content

Commit

Permalink
Bump pytest (#22320)
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd authored and jreback committed Aug 16, 2018
1 parent f07a790 commit b5d81cf
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ci/environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- flake8
- flake8-comprehensions
- moto
- pytest>=3.1
- pytest>=3.6
- python-dateutil>=2.5.0
- python=3
- pytz
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NumPy
flake8
flake8-comprehensions
moto
pytest>=3.1
pytest>=3.6
python-dateutil>=2.5.0
pytz
setuptools>=24.2.0
Expand Down
12 changes: 6 additions & 6 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -652,13 +652,13 @@ Adding tests is one of the most common requests after code is pushed to *pandas*
it is worth getting in the habit of writing tests ahead of time so this is never an issue.

Like many packages, *pandas* uses `pytest
<http://doc.pytest.org/en/latest/>`_ and the convenient
<http://docs.pytest.org/en/latest/>`_ and the convenient
extensions in `numpy.testing
<http://docs.scipy.org/doc/numpy/reference/routines.testing.html>`_.

.. note::

The earliest supported pytest version is 3.1.0.
The earliest supported pytest version is 3.6.0.

Writing tests
~~~~~~~~~~~~~
Expand Down Expand Up @@ -702,7 +702,7 @@ Transitioning to ``pytest``
class TestReallyCoolFeature(object):
....
Going forward, we are moving to a more *functional* style using the `pytest <http://doc.pytest.org/en/latest/>`__ framework, which offers a richer testing
Going forward, we are moving to a more *functional* style using the `pytest <http://docs.pytest.org/en/latest/>`__ framework, which offers a richer testing
framework that will facilitate testing and developing. Thus, instead of writing test classes, we will write test functions like this:

.. code-block:: python
Expand Down Expand Up @@ -766,7 +766,7 @@ A test run of this yields
((pandas) bash-3.2$ pytest test_cool_feature.py -v
=========================== test session starts ===========================
platform darwin -- Python 3.6.2, pytest-3.2.1, py-1.4.31, pluggy-0.4.0
platform darwin -- Python 3.6.2, pytest-3.6.0, py-1.4.31, pluggy-0.4.0
collected 11 items
tester.py::test_dtypes[int8] PASSED
Expand All @@ -788,7 +788,7 @@ Tests that we have ``parametrized`` are now accessible via the test name, for ex
((pandas) bash-3.2$ pytest test_cool_feature.py -v -k int8
=========================== test session starts ===========================
platform darwin -- Python 3.6.2, pytest-3.2.1, py-1.4.31, pluggy-0.4.0
platform darwin -- Python 3.6.2, pytest-3.6.0, py-1.4.31, pluggy-0.4.0
collected 11 items
test_cool_feature.py::test_dtypes[int8] PASSED
Expand Down Expand Up @@ -837,7 +837,7 @@ On Windows, one can type::
This can significantly reduce the time it takes to locally run tests before
submitting a pull request.
For more, see the `pytest <http://doc.pytest.org/en/latest/>`_ documentation.
For more, see the `pytest <http://docs.pytest.org/en/latest/>`_ documentation.
.. versionadded:: 0.20.0
Expand Down
4 changes: 2 additions & 2 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ pandas is equipped with an exhaustive set of unit tests, covering about 97% of
the code base as of this writing. To run it on your machine to verify that
everything is working (and that you have all of the dependencies, soft and hard,
installed), make sure you have `pytest
<http://doc.pytest.org/en/latest/>`__ and run:
<http://docs.pytest.org/en/latest/>`__ >= 3.6 and run:

::

>>> import pandas as pd
>>> pd.test()
running: pytest --skip-slow --skip-network C:\Users\TP\Anaconda3\envs\py36\lib\site-packages\pandas
============================= test session starts =============================
platform win32 -- Python 3.6.2, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
platform win32 -- Python 3.6.2, pytest-3.6.0, py-1.4.34, pluggy-0.4.0
rootdir: C:\Users\TP\Documents\Python\pandasdev\pandas, inifile: setup.cfg
collected 12145 items / 3 skipped

Expand Down
5 changes: 5 additions & 0 deletions doc/source/whatsnew/v0.23.5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Fixed Regressions
-
-


Development
~~~~~~~~~~~
- The minimum required pytest version has been increased to 3.6 (:issue:`22319`)

.. _whatsnew_0235.bug_fixes:

Bug Fixes
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ split_penalty_after_opening_bracket = 1000000
split_penalty_logical_operator = 30

[tool:pytest]
minversion = 3.6
testpaths = pandas
markers =
single: mark a test as single cpu only
Expand Down

0 comments on commit b5d81cf

Please sign in to comment.