diff --git a/ci/environment-dev.yaml b/ci/environment-dev.yaml
index 8d516a6214f95..f66a831aae0f5 100644
--- a/ci/environment-dev.yaml
+++ b/ci/environment-dev.yaml
@@ -8,7 +8,7 @@ dependencies:
- flake8
- flake8-comprehensions
- moto
- - pytest>=3.1
+ - pytest>=3.6
- python-dateutil>=2.5.0
- python=3
- pytz
diff --git a/ci/requirements_dev.txt b/ci/requirements_dev.txt
index c89aae8f2ffca..a50a4dcd63508 100644
--- a/ci/requirements_dev.txt
+++ b/ci/requirements_dev.txt
@@ -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
diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst
index ff06d024740bf..2ab78734f78a5 100644
--- a/doc/source/contributing.rst
+++ b/doc/source/contributing.rst
@@ -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
-`_ and the convenient
+`_ and the convenient
extensions in `numpy.testing
`_.
.. note::
- The earliest supported pytest version is 3.1.0.
+ The earliest supported pytest version is 3.6.0.
Writing tests
~~~~~~~~~~~~~
@@ -702,7 +702,7 @@ Transitioning to ``pytest``
class TestReallyCoolFeature(object):
....
-Going forward, we are moving to a more *functional* style using the `pytest `__ framework, which offers a richer testing
+Going forward, we are moving to a more *functional* style using the `pytest `__ 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
@@ -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
@@ -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
@@ -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 `_ documentation.
+For more, see the `pytest `_ documentation.
.. versionadded:: 0.20.0
diff --git a/doc/source/install.rst b/doc/source/install.rst
index eb837547037db..08be1960eb957 100644
--- a/doc/source/install.rst
+++ b/doc/source/install.rst
@@ -202,7 +202,7 @@ 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
-`__ and run:
+`__ >= 3.6 and run:
::
@@ -210,7 +210,7 @@ installed), make sure you have `pytest
>>> 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
diff --git a/doc/source/whatsnew/v0.23.5.txt b/doc/source/whatsnew/v0.23.5.txt
index 88ea7a6caecfc..2a1172c8050ad 100644
--- a/doc/source/whatsnew/v0.23.5.txt
+++ b/doc/source/whatsnew/v0.23.5.txt
@@ -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
diff --git a/setup.cfg b/setup.cfg
index d00d527da49e2..96f447e90cd58 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -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