summaryrefslogtreecommitdiff
path: root/dev-python/pytest
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-01-29 01:47:35 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-01-29 01:47:35 +0000
commitf881f2cd3d222d2179a718cb82ef5dfde0228808 (patch)
tree8a67f419866d3816197d72ada655d516d690d1a2 /dev-python/pytest
parente895f7dd1983af02c6f3e645a4a254447ffc5201 (diff)
downloadbaldeagleos-repo-f881f2cd3d222d2179a718cb82ef5dfde0228808.tar.gz
baldeagleos-repo-f881f2cd3d222d2179a718cb82ef5dfde0228808.tar.xz
baldeagleos-repo-f881f2cd3d222d2179a718cb82ef5dfde0228808.zip
Adding metadata
Diffstat (limited to 'dev-python/pytest')
-rw-r--r--dev-python/pytest/files/pytest-6.2.5-py310.patch81
-rw-r--r--dev-python/pytest/pytest-6.2.5-r2.ebuild33
-rw-r--r--dev-python/pytest/pytest-6.2.5-r3.ebuild80
3 files changed, 190 insertions, 4 deletions
diff --git a/dev-python/pytest/files/pytest-6.2.5-py310.patch b/dev-python/pytest/files/pytest-6.2.5-py310.patch
new file mode 100644
index 000000000000..89ca41954273
--- /dev/null
+++ b/dev-python/pytest/files/pytest-6.2.5-py310.patch
@@ -0,0 +1,81 @@
+From 5082686349185ef35f64d1a998a3062ee5a48771 Mon Sep 17 00:00:00 2001
+From: Ran Benita <ran@unusedvar.com>
+Date: Thu, 13 May 2021 17:27:43 +0300
+Subject: [PATCH 1/2] Merge pull request #8664 from
+ hroncok/test_unittest-ignore_DeprecationWarning-from-twisted
+
+Ignore DeprecationWarnings in test_trial_error
+
+(cherry picked from commit 850a8447792f89c7d38c72b2f542536655ab0354)
+---
+ testing/test_unittest.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/testing/test_unittest.py b/testing/test_unittest.py
+index 8b00cb826..de8fc5c55 100644
+--- a/testing/test_unittest.py
++++ b/testing/test_unittest.py
+@@ -533,7 +533,9 @@ class TestTrialUnittest:
+ # will crash both at test time and at teardown
+ """
+ )
+- result = testdir.runpytest("-vv", "-oconsole_output_style=classic")
++ result = testdir.runpytest(
++ "-vv", "-oconsole_output_style=classic", "-W", "ignore::DeprecationWarning"
++ )
+ result.stdout.fnmatch_lines(
+ [
+ "test_trial_error.py::TC::test_four FAILED",
+--
+2.35.0
+
+From 932792c22a300fc7794f966851df2b996f4a79bc Mon Sep 17 00:00:00 2001
+From: Bruno Oliveira <nicoddemus@gmail.com>
+Date: Thu, 16 Dec 2021 10:37:52 -0300
+Subject: [PATCH 2/2] Merge pull request #9417 from
+ nicoddemus/fix-py3.10.1-9413
+
+(cherry picked from commit 47df71d23ff13bd083b21ffcf839bd11169b42fc)
+---
+ .github/workflows/main.yml | 4 ++--
+ testing/test_skipping.py | 2 --
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
+index 5a9435357..a8a6406c6 100644
+--- a/.github/workflows/main.yml
++++ b/.github/workflows/main.yml
+@@ -75,7 +75,7 @@ jobs:
+ os: windows-latest
+ tox_env: "py39-xdist"
+ - name: "windows-py310"
+- python: "3.10-dev"
++ python: "3.10.1"
+ os: windows-latest
+ tox_env: "py310-xdist"
+
+@@ -105,7 +105,7 @@ jobs:
+ os: ubuntu-latest
+ tox_env: "py39-xdist"
+ - name: "ubuntu-py310"
+- python: "3.10-dev"
++ python: "3.10.1"
+ os: ubuntu-latest
+ tox_env: "py310-xdist"
+ - name: "ubuntu-pypy3"
+diff --git a/testing/test_skipping.py b/testing/test_skipping.py
+index 3cb8bdff2..487793645 100644
+--- a/testing/test_skipping.py
++++ b/testing/test_skipping.py
+@@ -1126,8 +1126,6 @@ def test_errors_in_xfail_skip_expressions(pytester: Pytester) -> None:
+ pypy_version_info = getattr(sys, "pypy_version_info", None)
+ if pypy_version_info is not None and pypy_version_info < (6,):
+ markline = markline[5:]
+- elif sys.version_info[:2] >= (3, 10):
+- markline = markline[11:]
+ elif sys.version_info >= (3, 8) or hasattr(sys, "pypy_version_info"):
+ markline = markline[4:]
+
+--
+2.35.0
+
diff --git a/dev-python/pytest/pytest-6.2.5-r2.ebuild b/dev-python/pytest/pytest-6.2.5-r2.ebuild
index 25f0730ecc8f..a1f6fc0ae42a 100644
--- a/dev-python/pytest/pytest-6.2.5-r2.ebuild
+++ b/dev-python/pytest/pytest-6.2.5-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9,10} pypy3 )
-inherit distutils-r1
+inherit distutils-r1 multiprocessing
DESCRIPTION="Simple powerful testing with Python"
HOMEPAGE="https://pytest.org/"
@@ -33,10 +33,16 @@ BDEPEND="
>=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/xmlschema[${PYTHON_USEDEP}]
)"
+PATCHES=(
+ # backport fixes for py3.10 test regressions
+ "${FILESDIR}"/${P}-py310.patch
+)
+
src_test() {
# workaround new readline defaults
echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
@@ -47,6 +53,25 @@ src_test() {
python_test() {
distutils_install_for_testing --via-root
- "${EPYTHON}" -m pytest -vv --lsof -rfsxX -p no:pkgcore -p no:flaky ||
- die "Tests failed with ${EPYTHON}"
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+
+ local EPYTEST_DESELECT=(
+ # broken by epytest args
+ testing/test_warnings.py::test_works_with_filterwarnings
+
+ # tend to be broken by random pytest plugins
+ # (these tests patch PYTEST_DISABLE_PLUGIN_AUTOLOAD out)
+ testing/test_helpconfig.py::test_version_less_verbose
+ testing/test_helpconfig.py::test_version_verbose
+ testing/test_junitxml.py::test_random_report_log_xdist
+ testing/test_junitxml.py::test_runs_twice_xdist
+ testing/test_terminal.py::TestProgressOutputStyle::test_xdist_normal
+ testing/test_terminal.py::TestProgressOutputStyle::test_xdist_normal_count
+ testing/test_terminal.py::TestProgressOutputStyle::test_xdist_verbose
+ testing/test_terminal.py::TestProgressWithTeardown::test_xdist_normal
+ testing/test_terminal.py::TestTerminalFunctional::test_header_trailer_info
+ testing/test_terminal.py::TestTerminalFunctional::test_no_header_trailer_info
+ )
+
+ epytest -p xdist -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
}
diff --git a/dev-python/pytest/pytest-6.2.5-r3.ebuild b/dev-python/pytest/pytest-6.2.5-r3.ebuild
new file mode 100644
index 000000000000..8b778ee20577
--- /dev/null
+++ b/dev-python/pytest/pytest-6.2.5-r3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{6,7,8,9,10} pypy3 )
+
+inherit distutils-r1 multiprocessing
+
+DESCRIPTION="Simple powerful testing with Python"
+HOMEPAGE="https://pytest.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}]
+ dev-python/iniconfig[${PYTHON_USEDEP}]
+ >=dev-python/more-itertools-4.0.0[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ >=dev-python/pluggy-0.12[${PYTHON_USEDEP}]
+ >=dev-python/py-1.8.2[${PYTHON_USEDEP}]
+ dev-python/toml[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ >=dev-python/setuptools_scm-3.4[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ dev-python/argcomplete[${PYTHON_USEDEP}]
+ >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/xmlschema[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ # backport fixes for py3.10 test regressions
+ "${FILESDIR}"/${P}-py310.patch
+)
+
+src_test() {
+ # workaround new readline defaults
+ echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
+ local -x INPUTRC="${T}"/inputrc
+ distutils-r1_src_test
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+
+ local EPYTEST_DESELECT=(
+ # broken by epytest args
+ testing/test_warnings.py::test_works_with_filterwarnings
+
+ # tend to be broken by random pytest plugins
+ # (these tests patch PYTEST_DISABLE_PLUGIN_AUTOLOAD out)
+ testing/test_helpconfig.py::test_version_less_verbose
+ testing/test_helpconfig.py::test_version_verbose
+ testing/test_junitxml.py::test_random_report_log_xdist
+ testing/test_junitxml.py::test_runs_twice_xdist
+ testing/test_terminal.py::TestProgressOutputStyle::test_xdist_normal
+ testing/test_terminal.py::TestProgressOutputStyle::test_xdist_normal_count
+ testing/test_terminal.py::TestProgressOutputStyle::test_xdist_verbose
+ testing/test_terminal.py::TestProgressWithTeardown::test_xdist_normal
+ testing/test_terminal.py::TestTerminalFunctional::test_header_trailer_info
+ testing/test_terminal.py::TestTerminalFunctional::test_no_header_trailer_info
+
+ # unstable with xdist
+ testing/test_terminal.py::TestTerminalFunctional::test_verbose_reporting_xdist
+ )
+
+ epytest -p xdist -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
+}