diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/pytest-cov | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/pytest-cov')
6 files changed, 179 insertions, 0 deletions
diff --git a/dev-python/pytest-cov/Manifest b/dev-python/pytest-cov/Manifest new file mode 100644 index 000000000000..89a5464f923b --- /dev/null +++ b/dev-python/pytest-cov/Manifest @@ -0,0 +1 @@ +DIST pytest-cov-2.8.1.tar.gz 47661 BLAKE2B 590fd50b69d01a71b20982d8cdbed0698ebe24c290d791bb44c96aa1aaaf77cf1f379d565eb775864c6945facf6d271115236cb44b95e4a4c9bb7cc6fd591acf SHA512 769a17c2095dbe990df148a0105c9e3dc88ac2265ac77ac31448dab6abf6d8cc0d54f5c6ff01fd708bd38700bfea93f57d3bb702bd9bb0a708257d094b2376ec diff --git a/dev-python/pytest-cov/files/pytest-cov-2.8.1-disable-broken-tests.patch b/dev-python/pytest-cov/files/pytest-cov-2.8.1-disable-broken-tests.patch new file mode 100644 index 000000000000..660db5e59431 --- /dev/null +++ b/dev-python/pytest-cov/files/pytest-cov-2.8.1-disable-broken-tests.patch @@ -0,0 +1,20 @@ +diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py +index e79e9aa..e5ef2c1 100644 +--- a/tests/test_pytest_cov.py ++++ b/tests/test_pytest_cov.py +@@ -820,6 +820,7 @@ parallel = true + assert result.ret == 0 + + ++@pytest.mark.skip(reason="test is broken") + def test_central_subprocess_change_cwd_with_pythonpath(testdir, monkeypatch): + stuff = testdir.mkdir('stuff') + parent_script = stuff.join('parent_script.py') +@@ -951,6 +952,7 @@ def test_invalid_coverage_source(testdir): + assert not matching_lines + + ++@pytest.mark.skip(reason="test is broken") + @pytest.mark.skipif("'dev' in pytest.__version__") + @pytest.mark.skipif('sys.platform == "win32" and platform.python_implementation() == "PyPy"') + def test_dist_missing_data(testdir): diff --git a/dev-python/pytest-cov/files/pytest-cov-2.8.1-latest-setuptools.patch b/dev-python/pytest-cov/files/pytest-cov-2.8.1-latest-setuptools.patch new file mode 100644 index 000000000000..8a9618c3fd98 --- /dev/null +++ b/dev-python/pytest-cov/files/pytest-cov-2.8.1-latest-setuptools.patch @@ -0,0 +1,40 @@ +diff --git a/setup.py b/setup.py +index 1305b23..3a5803e 100644 +--- a/setup.py ++++ b/setup.py +@@ -29,7 +29,7 @@ def read(*names, **kwargs): + + + class BuildWithPTH(build): +- def run(self): ++ def run(self, **kwargs): + build.run(self) + path = join(dirname(__file__), 'src', 'pytest-cov.pth') + dest = join(self.build_lib, basename(path)) +@@ -37,7 +37,7 @@ class BuildWithPTH(build): + + + class EasyInstallWithPTH(easy_install): +- def run(self): ++ def run(self, **kwargs): + easy_install.run(self) + path = join(dirname(__file__), 'src', 'pytest-cov.pth') + dest = join(self.install_dir, basename(path)) +@@ -45,7 +45,7 @@ class EasyInstallWithPTH(easy_install): + + + class InstallLibWithPTH(install_lib): +- def run(self): ++ def run(self, **kwargs): + install_lib.run(self) + path = join(dirname(__file__), 'src', 'pytest-cov.pth') + dest = join(self.install_dir, basename(path)) +@@ -57,7 +57,7 @@ class InstallLibWithPTH(install_lib): + + + class DevelopWithPTH(develop): +- def run(self): ++ def run(self, **kwargs): + develop.run(self) + path = join(dirname(__file__), 'src', 'pytest-cov.pth') + dest = join(self.install_dir, basename(path)) diff --git a/dev-python/pytest-cov/files/pytest-cov-2.8.1-python38.patch b/dev-python/pytest-cov/files/pytest-cov-2.8.1-python38.patch new file mode 100644 index 000000000000..6292672b6191 --- /dev/null +++ b/dev-python/pytest-cov/files/pytest-cov-2.8.1-python38.patch @@ -0,0 +1,52 @@ +diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py +index e79e9aa..198478b 100644 +--- a/tests/test_pytest_cov.py ++++ b/tests/test_pytest_cov.py +@@ -662,6 +662,7 @@ def test_fail(p): + ]) + + ++@pytest.mark.skipif("sys.hexversion >= 0x3080000", reason="Seems buggy on python3.8") + @pytest.mark.skipif('sys.platform == "win32" or platform.python_implementation() == "PyPy"') + def test_dist_combine_racecondition(testdir): + script = testdir.makepyfile(""" +@@ -1018,6 +1019,7 @@ def test_funcarg_not_active(testdir): + assert result.ret == 0 + + ++@pytest.mark.skipif("sys.hexversion >= 0x3080000", reason="https://bugs.python.org/issue38227") + @pytest.mark.skipif("sys.version_info[0] < 3", reason="no context manager api on Python 2") + @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows") + @pytest.mark.skipif('platform.python_implementation() == "PyPy"', reason="often deadlocks on PyPy") +@@ -1059,6 +1061,7 @@ def test_run_target(): + assert result.ret == 0 + + ++@pytest.mark.skipif("sys.hexversion >= 0x3080000", reason="https://bugs.python.org/issue38227") + @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows") + @pytest.mark.skipif('platform.python_implementation() == "PyPy"', reason="often deadlocks on PyPy") + def test_multiprocessing_pool_terminate(testdir): +@@ -1141,6 +1144,7 @@ def test_run_target(): + assert result.ret == 0 + + ++@pytest.mark.skipif("sys.hexversion >= 0x3080000", reason="https://bugs.python.org/issue38227") + @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows") + def test_multiprocessing_process(testdir): + pytest.importorskip('multiprocessing.util') +@@ -1171,6 +1175,7 @@ def test_run_target(): + assert result.ret == 0 + + ++@pytest.mark.skipif("sys.hexversion >= 0x3080000", reason="https://bugs.python.org/issue38227") + @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows") + def test_multiprocessing_process_no_source(testdir): + pytest.importorskip('multiprocessing.util') +@@ -1201,6 +1206,7 @@ def test_run_target(): + assert result.ret == 0 + + ++@pytest.mark.skipif("sys.hexversion >= 0x3080000", reason="https://bugs.python.org/issue38227") + @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows") + def test_multiprocessing_process_with_terminate(testdir): + pytest.importorskip('multiprocessing.util') diff --git a/dev-python/pytest-cov/metadata.xml b/dev-python/pytest-cov/metadata.xml new file mode 100644 index 000000000000..4eaea161b985 --- /dev/null +++ b/dev-python/pytest-cov/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <stabilize-allarches/> + <upstream> + <remote-id type="pypi">pytest-cov</remote-id> + <remote-id type="bitbucket">memedough/pytest-cov</remote-id> + <remote-id type="github">pytest-dev/pytest-cov</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-python/pytest-cov/pytest-cov-2.8.1.ebuild b/dev-python/pytest-cov/pytest-cov-2.8.1.ebuild new file mode 100644 index 000000000000..9bf837927521 --- /dev/null +++ b/dev-python/pytest-cov/pytest-cov-2.8.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python{2_7,3_{6..9}} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="py.test plugin for coverage reporting" +HOMEPAGE="https://github.com/pytest-dev/pytest-cov https://pypi.org/project/pytest-cov/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/py-1.4.22[${PYTHON_USEDEP}] + >=dev-python/pytest-3.6[${PYTHON_USEDEP}] + >=dev-python/coverage-4.4[${PYTHON_USEDEP}] +" +DEPEND=" + test? ( + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-python/fields[${PYTHON_USEDEP}] + >=dev-python/process-tests-2.0.2[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + # Bug 597708 + "${FILESDIR}/${PN}-2.8.1-disable-broken-tests.patch" + "${FILESDIR}/${PN}-2.8.1-latest-setuptools.patch" + # https://github.com/pytest-dev/pytest-cov/issues/365 + "${FILESDIR}/pytest-cov-2.8.1-python38.patch" +) + +distutils_enable_sphinx docs \ + dev-python/sphinx-py3doc-enhanced-theme + +python_test() { + distutils_install_for_testing + PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}" \ + PYTEST_PLUGINS=${PN/-/_} \ + pytest -vv || die "Tests failed under ${EPYTHON}" +} |
