forked from freebsd/freebsd-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade py-pytest-cov from 2.9.0 to 4.0
Summary: This is required so py-pytest-cov is functional with newer versions of py-pytest-xdist [1]. Backport patches from upstream commit to [selectively] add 3.11 support to make some of the tests not fail when run with newer versions of coverage.py [2]. While here, appease portlint by shifting where variables (`CONFLICTS`, etc) are defined. 1. pytest-dev/pytest-cov#422 2. pytest-dev/pytest-cov#570 PR: 269360 Co-Authored-With: Yuri Victorovich <yuri@freebsd.org> Test Plan: `make test` passes with this change. Reviewers: dbaio Subscribers: mat, yuri Differential Revision: https://reviews.freebsd.org/D39035
- Loading branch information
Showing
4 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1590933452 | ||
SHA256 (pytest-cov-2.9.0.tar.gz) = b6a814b8ed6247bd81ff47f038511b57fe1ce7f4cc25b9106f1a4b106f1d9322 | ||
SIZE (pytest-cov-2.9.0.tar.gz) = 54269 | ||
TIMESTAMP = 1678653801 | ||
SHA256 (pytest-cov-4.0.0.tar.gz) = 996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470 | ||
SIZE (pytest-cov-4.0.0.tar.gz) = 62013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- setup.py.orig 2022-09-28 15:20:20 UTC | ||
+++ setup.py | ||
@@ -111,11 +111,11 @@ setup( | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3 :: Only', | ||
- 'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
+ 'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
'Topic :: Software Development :: Testing', | ||
@@ -133,7 +133,7 @@ setup( | ||
'pytest>=4.6', | ||
'coverage[toml]>=5.2.1' | ||
], | ||
- python_requires='>=3.6', | ||
+ python_requires='>=3.7', | ||
extras_require={ | ||
'testing': [ | ||
'fields', |
19 changes: 19 additions & 0 deletions
19
devel/py-pytest-cov/files/patch-tests_test__pytest__cov.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- tests/test_pytest_cov.py.orig 2022-09-28 15:03:24 UTC | ||
+++ tests/test_pytest_cov.py | ||
@@ -1556,6 +1556,8 @@ def test_foo(): | ||
SCRIPT_SIMPLE_RESULT = '4 * 100%' | ||
|
||
|
||
+@pytest.mark.skipif('tuple(int(x) for x in xdist.__version__.split(".")) >= (2, 5, 0)', | ||
+ reason="--boxed option was removed in version 2.5.0") | ||
@pytest.mark.skipif('sys.platform == "win32"') | ||
def test_dist_boxed(testdir): | ||
script = testdir.makepyfile(SCRIPT_SIMPLE) | ||
@@ -1916,6 +1918,7 @@ EXPECTED_CONTEXTS = { | ||
|
||
|
||
@pytest.mark.skipif("coverage.version_info < (5, 0)") | ||
+@pytest.mark.skipif("coverage.version_info > (6, 4)") | ||
@xdist_params | ||
def test_contexts(pytester, testdir, opts): | ||
with open(os.path.join(os.path.dirname(__file__), "contextful.py")) as f: |