Gentoo Archives: gentoo-commits

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pytest-randomly/
Date: Wed, 01 Jun 2022 05:03:11
Message-Id: 1654059765.d9a8752fe4e6b3553fee3c8a744b5c70274fbcd1.cybertailor@gentoo
1 commit: d9a8752fe4e6b3553fee3c8a744b5c70274fbcd1
2 Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Wed Jun 1 02:42:42 2022 +0000
4 Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
5 CommitDate: Wed Jun 1 05:02:45 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d9a8752f
7
8 dev-python/pytest-randomly: fix tests and deps
9
10 Closes: https://bugs.gentoo.org/823011
11 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
12
13 dev-python/pytest-randomly/Manifest | 2 +-
14 .../pytest-randomly/pytest-randomly-3.12.0.ebuild | 34 ++++++++++++++++------
15 2 files changed, 26 insertions(+), 10 deletions(-)
16
17 diff --git a/dev-python/pytest-randomly/Manifest b/dev-python/pytest-randomly/Manifest
18 index 0689b4453..083bee428 100644
19 --- a/dev-python/pytest-randomly/Manifest
20 +++ b/dev-python/pytest-randomly/Manifest
21 @@ -1 +1 @@
22 -DIST pytest-randomly-3.12.0.tar.gz 30426 BLAKE2B 22e7ac58787a98b24a672f2fc2fdba8069213008f11c66eb05320be99662311b0273b0c32079d59792964075abe6fd2f224ce03eb0d3b2dcf0a79e180f1a067e SHA512 e2241c1304b9597f93cc57d6830808f85c59ea1b4815624dcd9d088f87eb4a34d6cb6394de9c31ebedcb8280fb6ff12b110fd5a559ab28c9e0381481fce52c4d
23 +DIST pytest-randomly-3.12.0.gh.tar.gz 30426 BLAKE2B 22e7ac58787a98b24a672f2fc2fdba8069213008f11c66eb05320be99662311b0273b0c32079d59792964075abe6fd2f224ce03eb0d3b2dcf0a79e180f1a067e SHA512 e2241c1304b9597f93cc57d6830808f85c59ea1b4815624dcd9d088f87eb4a34d6cb6394de9c31ebedcb8280fb6ff12b110fd5a559ab28c9e0381481fce52c4d
24
25 diff --git a/dev-python/pytest-randomly/pytest-randomly-3.12.0.ebuild b/dev-python/pytest-randomly/pytest-randomly-3.12.0.ebuild
26 index 26f2f90a4..e951ea6aa 100644
27 --- a/dev-python/pytest-randomly/pytest-randomly-3.12.0.ebuild
28 +++ b/dev-python/pytest-randomly/pytest-randomly-3.12.0.ebuild
29 @@ -13,26 +13,42 @@ HOMEPAGE="
30 https://pypi.python.org/pypi/pytest-randomly/
31 https://github.com/pytest-dev/pytest-randomly
32 "
33 -SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
34 +SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
35
36 LICENSE="BSD"
37 SLOT="0"
38 KEYWORDS="~amd64"
39
40 RDEPEND="
41 - dev-python/factory_boy[${PYTHON_USEDEP}]
42 - dev-python/Faker[${PYTHON_USEDEP}]
43 dev-python/pytest[${PYTHON_USEDEP}]
44 - dev-python/pytest-xdist[${PYTHON_USEDEP}]
45 -
46 - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' python3_{8..10})
47 $(python_gen_cond_dep '>=dev-python/importlib_metadata-3.6.0[${PYTHON_USEDEP}]' python3_{8,9})
48 "
49 -DEPEND="${RDEPEND}"
50 +# tests pytest-xdist integration
51 +BDEPEND="test? (
52 + dev-python/factory_boy[${PYTHON_USEDEP}]
53 + dev-python/Faker[${PYTHON_USEDEP}]
54 + dev-python/numpy[${PYTHON_USEDEP}]
55 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
56 +)"
57 +
58 +EPYTEST_DESELECT=(
59 + tests/test_pytest_randomly.py::test_entrypoint_injection
60 + tests/test_pytest_randomly.py::test_it_runs_before_stepwise
61 + tests/test_pytest_randomly.py::test_works_without_xdist
62 +
63 + # Output mismatch
64 + tests/test_pytest_randomly.py::test_class_test_methods_reordered
65 + tests/test_pytest_randomly.py::test_classes_reordered
66 + tests/test_pytest_randomly.py::test_doctests_in_txt_files_reordered
67 + tests/test_pytest_randomly.py::test_doctests_reordered
68 + tests/test_pytest_randomly.py::test_files_reordered
69 + tests/test_pytest_randomly.py::test_files_reordered_when_seed_not_reset
70 + tests/test_pytest_randomly.py::test_test_functions_reordered
71 + tests/test_pytest_randomly.py::test_test_functions_reordered_when_randomness_in_module
72 +)
73
74 distutils_enable_tests pytest
75
76 python_test() {
77 - distutils_install_for_testing --via-root
78 - pytest -vv || die "Testsuite failed under ${EPYTHON}"
79 + epytest -p no:randomly
80 }