diff --git a/src/python/pants/backend/python/subsystems/pytest.py b/src/python/pants/backend/python/subsystems/pytest.py index e3eb7f9e1b6..cbf53f953dd 100644 --- a/src/python/pants/backend/python/subsystems/pytest.py +++ b/src/python/pants/backend/python/subsystems/pytest.py @@ -14,7 +14,9 @@ class PyTest(Subsystem): def register_options(cls, register): super(PyTest, cls).register_options(register) # TODO: This is currently bounded below `3.7` due to #6282. - register('--requirements', advanced=True, default='pytest>=3.0.7,<3.7', + # TODO: Additionally, this is temporarily pinned to 3.0.7 due to more-itertools 6.0.0 dropping + # Python 2 support: https://github.com/pytest-dev/pytest/issues/4770. + register('--requirements', advanced=True, default='pytest==3.0.7', help='Requirements string for the pytest library.') register('--timeout-requirements', advanced=True, default='pytest-timeout>=1.2,<1.3', help='Requirements string for the pytest-timeout library.') diff --git a/tests/python/pants_test/rules/test_test_integration.py b/tests/python/pants_test/rules/test_test_integration.py index 6f28e5bf31c..913752de8dc 100644 --- a/tests/python/pants_test/rules/test_test_integration.py +++ b/tests/python/pants_test/rules/test_test_integration.py @@ -72,7 +72,7 @@ def test_passing_python_test(self): platform SOME_TEXT rootdir: SOME_TEXT plugins: SOME_TEXT -collected 1 item +collected 1 items testprojects/tests/python/pants/dummies/test_pass.py . [100%] @@ -92,7 +92,7 @@ def test_failing_python_test(self): platform SOME_TEXT rootdir: SOME_TEXT plugins: SOME_TEXT -collected 1 item +collected 1 items testprojects/tests/python/pants/dummies/test_fail.py F [100%] @@ -120,7 +120,7 @@ def test_source_dep(self): platform SOME_TEXT rootdir: SOME_TEXT plugins: SOME_TEXT -collected 1 item +collected 1 items testprojects/tests/python/pants/dummies/test_with_source_dep.py . [100%] @@ -139,7 +139,7 @@ def test_thirdparty_dep(self): platform SOME_TEXT rootdir: SOME_TEXT plugins: SOME_TEXT -collected 1 item +collected 1 items testprojects/tests/python/pants/dummies/test_with_thirdparty_dep.py . [100%] @@ -160,7 +160,7 @@ def test_mixed_python_tests(self): platform SOME_TEXT rootdir: SOME_TEXT plugins: SOME_TEXT -collected 1 item +collected 1 items testprojects/tests/python/pants/dummies/test_fail.py F [100%] @@ -177,7 +177,7 @@ def test_fail(): platform SOME_TEXT rootdir: SOME_TEXT plugins: SOME_TEXT -collected 1 item +collected 1 items testprojects/tests/python/pants/dummies/test_pass.py . [100%]