commit:     4dca46dd7092bbb9a50486201ae9bdeab1d4c45d
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  5 18:42:39 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Apr  5 19:23:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dca46dd

dev-python/pytest-order: new package, add 1.1.0

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/pytest-order/Manifest                   |  1 +
 .../files/pytest-ordering-0.6-fix-pytest-6.patch   | 21 +++++++++++++
 dev-python/pytest-order/metadata.xml               | 13 +++++++++
 dev-python/pytest-order/pytest-order-1.1.0.ebuild  | 34 ++++++++++++++++++++++
 4 files changed, 69 insertions(+)

diff --git a/dev-python/pytest-order/Manifest b/dev-python/pytest-order/Manifest
new file mode 100644
index 000000000000..f5d10edcee2d
--- /dev/null
+++ b/dev-python/pytest-order/Manifest
@@ -0,0 +1 @@
+DIST pytest-order-1.1.0.tar.gz 43385 BLAKE2B 
e0bb40d89dbbb382dec2828d024b9a9a8353c87a89d0d9fce517df2be248dc3d9f24672a91f6a9dd82e473d41fb677cc13ef1201563e25402288d5144a8742c0
 SHA512 
0ce0e0b0437031e672acb838f9e2bb40c2ee8afcc8463c779959309ace125b3a4c92efcf5e156c97037fa6b8d51c255e7cf272427e44587608c2a370289dd3c3

diff --git 
a/dev-python/pytest-order/files/pytest-ordering-0.6-fix-pytest-6.patch 
b/dev-python/pytest-order/files/pytest-ordering-0.6-fix-pytest-6.patch
new file mode 100644
index 000000000000..3a3ea15f4b8e
--- /dev/null
+++ b/dev-python/pytest-order/files/pytest-ordering-0.6-fix-pytest-6.patch
@@ -0,0 +1,21 @@
+From 9bfb05700386254afabb38f762e0ea860b567209 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <[email protected]>
+Date: Tue, 26 Jan 2021 20:42:14 +0100
+Subject: [PATCH] Don't use accidental pytest API, fix tests for pytest 6.2+
+
+https://github.com/ftobia/pytest-ordering/pull/76
+
+--- a/tests/test_ordering.py
++++ b/tests/test_ordering.py
+@@ -12,9 +12,9 @@ def item_names_for(testdir):
+     def _item_names_for(tests_content):
+         # some strange code to extract sorted items
+         items = testdir.getitems(tests_content)
+-        hook = testdir.config.hook
++        hook = items[0].config.hook
+         hook.pytest_collection_modifyitems(session=items[0].session,
+-                                           config=testdir.config, items=items)
++                                           config=items[0].config, 
items=items)
+         return [item.name for item in items]
+
+     return _item_names_for

diff --git a/dev-python/pytest-order/metadata.xml 
b/dev-python/pytest-order/metadata.xml
new file mode 100644
index 000000000000..f46411ababd4
--- /dev/null
+++ b/dev-python/pytest-order/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Andrew Ammerlaan</name>
+       </maintainer>
+       <stabilize-allarches/>
+       <upstream>
+               <remote-id type="github">pytest-dev/pytest-order</remote-id>
+               <remote-id type="pypi">pytest-order</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/dev-python/pytest-order/pytest-order-1.1.0.ebuild 
b/dev-python/pytest-order/pytest-order-1.1.0.ebuild
new file mode 100644
index 000000000000..d5434216c219
--- /dev/null
+++ b/dev-python/pytest-order/pytest-order-1.1.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="pytest plugin to run your tests in a specific order"
+HOMEPAGE="
+       https://github.com/pytest-dev/pytest-order
+       https://pypi.org/project/pytest-order/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=dev-python/pytest-6.4.2[${PYTHON_USEDEP}]"
+
+EPYTEST_DESELECT=(
+       # Appears to fail due to extra warning in pytest 7
+       "tests/test_dependency.py::test_order_dependencies_no_auto_mark"
+       "tests/test_dependency.py::test_order_dependencies_auto_mark"
+       
"tests/test_order_group_scope_dep.py::test_class_group_scope_module_scope"
+       
"tests/test_order_group_scope_named_dep.py::test_class_group_scope_module_scope"
+       "tests/test_xdist_handling.py::test_xdist_ordering"
+)
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs/source

Reply via email to