1 |
commit: a4070a13d3701c0688edde718c186b6c2f8750b0 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 23 16:40:47 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 23 16:44:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4070a13 |
7 |
|
8 |
dev-python/pytest-ordering: enable py3.10, fix for >=pytest-6 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
.../files/pytest-ordering-0.6-fix-pytest-6.patch | 21 +++++++++++++++++++++ |
13 |
.../pytest-ordering/pytest-ordering-0.6.ebuild | 8 ++++++-- |
14 |
2 files changed, 27 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch b/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..3a3ea15f4b8 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch |
21 |
@@ -0,0 +1,21 @@ |
22 |
+From 9bfb05700386254afabb38f762e0ea860b567209 Mon Sep 17 00:00:00 2001 |
23 |
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@×××××××.cz> |
24 |
+Date: Tue, 26 Jan 2021 20:42:14 +0100 |
25 |
+Subject: [PATCH] Don't use accidental pytest API, fix tests for pytest 6.2+ |
26 |
+ |
27 |
+https://github.com/ftobia/pytest-ordering/pull/76 |
28 |
+ |
29 |
+--- a/tests/test_ordering.py |
30 |
++++ b/tests/test_ordering.py |
31 |
+@@ -12,9 +12,9 @@ def item_names_for(testdir): |
32 |
+ def _item_names_for(tests_content): |
33 |
+ # some strange code to extract sorted items |
34 |
+ items = testdir.getitems(tests_content) |
35 |
+- hook = testdir.config.hook |
36 |
++ hook = items[0].config.hook |
37 |
+ hook.pytest_collection_modifyitems(session=items[0].session, |
38 |
+- config=testdir.config, items=items) |
39 |
++ config=items[0].config, items=items) |
40 |
+ return [item.name for item in items] |
41 |
+ |
42 |
+ return _item_names_for |
43 |
|
44 |
diff --git a/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild b/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild |
45 |
index 0bd6f7293be..25ef67eebc1 100644 |
46 |
--- a/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild |
47 |
+++ b/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild |
48 |
@@ -3,7 +3,7 @@ |
49 |
|
50 |
EAPI=7 |
51 |
|
52 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
53 |
+PYTHON_COMPAT=( python3_{8..10} ) |
54 |
|
55 |
inherit distutils-r1 |
56 |
|
57 |
@@ -18,7 +18,11 @@ LICENSE="MIT" |
58 |
SLOT="0" |
59 |
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 sparc x86" |
60 |
|
61 |
-RDEPEND="<dev-python/pytest-6[${PYTHON_USEDEP}]" |
62 |
+RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]" |
63 |
+ |
64 |
+PATCHES=( |
65 |
+ "${FILESDIR}/${P}-fix-pytest-6.patch" |
66 |
+) |
67 |
|
68 |
distutils_enable_tests --install pytest |
69 |
distutils_enable_sphinx docs/source |