Date: Thursday, April 13, 2023 @ 02:47:30
Author: felixonmars
Revision: 1445056
archrelease: copy trunk to community-staging-any
Added:
python-pytest-randomly/repos/community-staging-any/
python-pytest-randomly/repos/community-staging-any/PKGBUILD
(from rev 1445055, python-pytest-randomly/trunk/PKGBUILD)
python-pytest-randomly/repos/community-staging-any/python-pytest-randomly-pytest-7.3.patch
(from rev 1445055,
python-pytest-randomly/trunk/python-pytest-randomly-pytest-7.3.patch)
-----------------------------------------+
PKGBUILD | 40 +++++++++++++
python-pytest-randomly-pytest-7.3.patch | 91 ++++++++++++++++++++++++++++++
2 files changed, 131 insertions(+)
Copied: python-pytest-randomly/repos/community-staging-any/PKGBUILD (from rev
1445055, python-pytest-randomly/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-13 02:47:30 UTC (rev 1445056)
@@ -0,0 +1,40 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-pytest-randomly
+pkgver=3.12.0
+pkgrel=2
+pkgdesc='Pytest plugin to randomly order tests and control random.seed'
+arch=('any')
+license=('MIT')
+url='https://github.com/pytest-dev/pytest-randomly'
+depends=('python-importlib-metadata' 'python-pytest')
+makedepends=('python-setuptools')
+checkdepends=('python-factory-boy' 'python-faker' 'python-numpy'
'python-pytest-xdist')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-randomly/archive/$pkgver.tar.gz"
+ $pkgname-pytest-7.3.patch)
+sha512sums=('e2241c1304b9597f93cc57d6830808f85c59ea1b4815624dcd9d088f87eb4a34d6cb6394de9c31ebedcb8280fb6ff12b110fd5a559ab28c9e0381481fce52c4d'
+
'31a70171bd74ad21c94516fa0110878f12f6dade861bdb7c0e52ebbc39f28a7929543041303bfc29d1011414a8ce347edfa95a5dfdadcd202dc2924d4390d984')
+
+prepare() {
+ cd pytest-randomly-$pkgver
+ patch -p1 -i ../$pkgname-pytest-7.3.patch
+}
+
+build() {
+ cd pytest-randomly-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd pytest-randomly-$pkgver
+ # TODO: Understand why...
+ PYTHONPATH="$PWD/src" pytest --deselect
tests/test_pytest_randomly.py::test_entrypoint_injection
+}
+
+package() {
+ cd pytest-randomly-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
Copied:
python-pytest-randomly/repos/community-staging-any/python-pytest-randomly-pytest-7.3.patch
(from rev 1445055,
python-pytest-randomly/trunk/python-pytest-randomly-pytest-7.3.patch)
===================================================================
--- community-staging-any/python-pytest-randomly-pytest-7.3.patch
(rev 0)
+++ community-staging-any/python-pytest-randomly-pytest-7.3.patch
2023-04-13 02:47:30 UTC (rev 1445056)
@@ -0,0 +1,91 @@
+From d663e203db254f7e310e4de0e4622e5596860698 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <[email protected]>
+Date: Wed, 12 Apr 2023 09:21:26 +0200
+Subject: [PATCH] Make the tests work with pytest 7.3.0 (#540)
+
+Co-authored-by: Adam Johnson <[email protected]>
+---
+ requirements/py310.txt | 10 +++-------
+ requirements/py311.txt | 10 +++-------
+ requirements/py37.txt | 10 +++-------
+ requirements/py38.txt | 10 +++-------
+ requirements/py39.txt | 10 +++-------
+ tests/test_pytest_randomly.py | 16 ++++++++--------
+ 6 files changed, 23 insertions(+), 43 deletions(-)
+
+diff --git a/tests/test_pytest_randomly.py b/tests/test_pytest_randomly.py
+index 2bbbe9d..83da2a5 100644
+--- a/tests/test_pytest_randomly.py
++++ b/tests/test_pytest_randomly.py
+@@ -251,7 +251,7 @@ def test_it():
+ out = ourtester.runpytest(*args)
+
+ out.assert_outcomes(passed=4, failed=0)
+- assert out.outlines[8:12] == [
++ assert out.outlines[9:13] == [
+ "test_b.py::test_it PASSED",
+ "test_a.py::test_it PASSED",
+ "test_d.py::test_it PASSED",
+@@ -271,7 +271,7 @@ def test_it():
+ out = ourtester.runpytest(*args)
+
+ out.assert_outcomes(passed=4, failed=0)
+- assert out.outlines[8:12] == [
++ assert out.outlines[9:13] == [
+ "test_b.py::test_it PASSED",
+ "test_a.py::test_it PASSED",
+ "test_d.py::test_it PASSED",
+@@ -310,7 +310,7 @@ def test_d(self):
+ out = ourtester.runpytest(*args)
+
+ out.assert_outcomes(passed=4, failed=0)
+- assert out.outlines[8:12] == [
++ assert out.outlines[9:13] == [
+ "test_one.py::D::test_d PASSED",
+ "test_one.py::B::test_b PASSED",
+ "test_one.py::C::test_c PASSED",
+@@ -342,7 +342,7 @@ def test_d(self):
+ out = ourtester.runpytest(*args)
+
+ out.assert_outcomes(passed=4, failed=0)
+- assert out.outlines[8:12] == [
++ assert out.outlines[9:13] == [
+ "test_one.py::T::test_c PASSED",
+ "test_one.py::T::test_b PASSED",
+ "test_one.py::T::test_a PASSED",
+@@ -371,7 +371,7 @@ def test_d():
+ out = ourtester.runpytest(*args)
+
+ out.assert_outcomes(passed=4, failed=0)
+- assert out.outlines[8:12] == [
++ assert out.outlines[9:13] == [
+ "test_one.py::test_c PASSED",
+ "test_one.py::test_a PASSED",
+ "test_one.py::test_b PASSED",
+@@ -405,7 +405,7 @@ def test_d():
+ out = ourtester.runpytest(*args)
+
+ out.assert_outcomes(passed=4, failed=0)
+- assert out.outlines[8:12] == [
++ assert out.outlines[9:13] == [
+ "test_one.py::test_c PASSED",
+ "test_one.py::test_a PASSED",
+ "test_one.py::test_b PASSED",
+@@ -435,7 +435,7 @@ def bar():
+
+ out = ourtester.runpytest(*args)
+ out.assert_outcomes(passed=2)
+- assert out.outlines[8:10] == [
++ assert out.outlines[9:11] == [
+ "test_one.py::test_one.bar PASSED",
+ "test_one.py::test_one.foo PASSED",
+ ]
+@@ -515,7 +515,7 @@ def test_doctests_in_txt_files_reordered(ourtester):
+
+ out = ourtester.runpytest(*args)
+ out.assert_outcomes(passed=2)
+- assert out.outlines[8:10] == [
++ assert out.outlines[9:11] == [
+ "test2.txt::test2.txt PASSED",
+ "test.txt::test.txt PASSED",
+ ]