From 8c7867f68246d07a00e1e29ba1f95fb8648a666d Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 13 Aug 2018 12:25:11 -0700 Subject: [PATCH 1/6] Updated dependency file --- ci/environment-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 68941b3680c576742cb1ddd28829442a205d909d Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 13 Aug 2018 12:25:39 -0700 Subject: [PATCH 2/6] Updated new dev file via script --- ci/requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4e6687c58c8e28d52a117c4ed867b60729bb48ec Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 13 Aug 2018 20:21:50 -0700 Subject: [PATCH 3/6] Added minversion to pytest config --- setup.cfg | 1 + 1 file changed, 1 insertion(+) 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 From a0f11a0a7875a70317bfe6e113d08222d202f437 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Tue, 14 Aug 2018 08:47:35 -0700 Subject: [PATCH 4/6] Doc updates --- doc/source/contributing.rst | 6 +++--- doc/source/whatsnew/v0.23.5.txt | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index ff06d024740bf..feff42b8ace6e 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -658,7 +658,7 @@ 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 ~~~~~~~~~~~~~ @@ -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 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 From 6d41a5cb0735985ffcd0546a1310825d508ccd74 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 15 Aug 2018 10:03:44 -0700 Subject: [PATCH 5/6] Updated install.rst --- doc/source/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index eb837547037db..af5ed66a146fc 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 From b26dacc9ea4e6adb2a861a9750ad8e260f7113b9 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 15 Aug 2018 11:57:57 -0700 Subject: [PATCH 6/6] Updated pytest links --- doc/source/contributing.rst | 6 +++--- doc/source/install.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index feff42b8ace6e..2ab78734f78a5 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -652,7 +652,7 @@ 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 `_. @@ -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 @@ -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 af5ed66a146fc..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 -`__ >= 3.6 and run: +`__ >= 3.6 and run: ::