diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-10-10 09:39:20 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-10-10 09:39:50 +0200 |
commit | b162b6377b186fe5a4d9972a8ec313d37b92df28 (patch) | |
tree | ab31c352d3d350dded902a0d21c05332c17d0f62 /dev-python/pytest-cov/pytest-cov-4.1.0.ebuild | |
parent | dev-python/pytest-timeout: pytest-cov now supports 3.12 (diff) | |
download | gentoo-b162b6377b186fe5a4d9972a8ec313d37b92df28.tar.gz gentoo-b162b6377b186fe5a4d9972a8ec313d37b92df28.tar.bz2 gentoo-b162b6377b186fe5a4d9972a8ec313d37b92df28.zip |
dev-python/pytest-cov: Revert "deselect problematic subprocess tests"
The approach was correct. However, the setup code is creating a broken
symlink now. Let's fix that instead.
Reverts: 8779b842df8e06a07704874671631d3f100d75df
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pytest-cov/pytest-cov-4.1.0.ebuild')
-rw-r--r-- | dev-python/pytest-cov/pytest-cov-4.1.0.ebuild | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/dev-python/pytest-cov/pytest-cov-4.1.0.ebuild b/dev-python/pytest-cov/pytest-cov-4.1.0.ebuild index 5eb2730fc4ca..7ef9b625e52a 100644 --- a/dev-python/pytest-cov/pytest-cov-4.1.0.ebuild +++ b/dev-python/pytest-cov/pytest-cov-4.1.0.ebuild @@ -49,15 +49,6 @@ python_test() { local EPYTEST_DESELECT=( # attempts to install packages via pip (network) tests/test_pytest_cov.py::test_dist_missing_data - # TODO: pytest-cov.pth breaks importing coverage - # https://bugs.gentoo.org/889886 - tests/test_pytest_cov.py::test_append_coverage_subprocess - tests/test_pytest_cov.py::test_central_subprocess_change_cwd - tests/test_pytest_cov.py::test_central_subprocess_change_cwd_with_pythonpath - tests/test_pytest_cov.py::test_central_subprocess - tests/test_pytest_cov.py::test_dist_subprocess_collocated - tests/test_pytest_cov.py::test_dist_subprocess_not_collocated - tests/test_pytest_cov.py::test_subprocess_with_path_aliasing # TODO tests/test_pytest_cov.py::test_contexts tests/test_pytest_cov.py::test_cleanup_on_sigterm @@ -66,5 +57,18 @@ python_test() { tests/test_pytest_cov.py::test_cleanup_on_sigterm_sig_ign ) - epytest -n "$(makeopts_jobs)" --dist=worksteal + local src=$( + "${EPYTHON}" -c "import coverage as m; print(*m.__path__)" || die + ) + # TODO: why do we need to do that?! + # https://github.com/pytest-dev/pytest-cov/issues/517 + ln -s "${src}/coverage" \ + "${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die + + nonfatal epytest -n "$(makeopts_jobs)" --dist=worksteal + local ret=${?} + + rm "${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die + + [[ ${ret} -ne 0 ]] && die "epytest failed on ${EPYTHON}" } |