Sync from SUSE:SLFO:Main python-pytest-dependency revision 3b093984ee67e5355e8b52414c7dab57

This commit is contained in:
Adrian Schröter 2024-05-03 22:21:11 +02:00
commit 5f98b033ab
5 changed files with 633 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
pytest-dependency-0.5.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

506
pytest6.2.patch Normal file
View File

@ -0,0 +1,506 @@
From 0930889a13e2b9baa7617f05dc9b55abede5209d Mon Sep 17 00:00:00 2001
From: Rolf Krahl <rolf@rotkraut.de>
Date: Sun, 21 Feb 2021 13:06:35 +0100
Subject: [PATCH] Adapt matching of expected output in the tests to adapt to
changes in pytest 6.2.0 and newer, fix #50
---
tests/test_02_simple_dependency.py | 54 ++++++++++++------------
tests/test_03_class.py | 32 +++++++-------
tests/test_03_multiple_dependency.py | 24 +++++------
tests/test_03_param.py | 28 ++++++-------
tests/test_03_runtime.py | 10 ++---
tests/test_03_scope.py | 62 ++++++++++++++--------------
tests/test_03_skipmsgs.py | 10 ++---
tests/test_04_automark.py | 18 ++++----
tests/test_04_ignore_unknown.py | 8 ++--
9 files changed, 123 insertions(+), 123 deletions(-)
diff --git a/tests/test_02_simple_dependency.py b/tests/test_02_simple_dependency.py
index a010f80..3c45f2c 100644
--- a/tests/test_02_simple_dependency.py
+++ b/tests/test_02_simple_dependency.py
@@ -29,11 +29,11 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=3, skipped=1, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a SKIPPED
- *::test_b PASSED
- *::test_c PASSED
- *::test_d PASSED
+ result.stdout.re_match_lines(r"""
+ .*::test_a SKIPPED(?:\s+\(.*\))?
+ .*::test_b PASSED
+ .*::test_c PASSED
+ .*::test_d PASSED
""")
@@ -62,11 +62,11 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=1, skipped=3, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b SKIPPED
- *::test_c SKIPPED
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b SKIPPED(?:\s+\(.*\))?
+ .*::test_c SKIPPED(?:\s+\(.*\))?
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
@@ -95,11 +95,11 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=1, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b FAILED
- *::test_c SKIPPED
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b FAILED
+ .*::test_c SKIPPED(?:\s+\(.*\))?
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
@@ -127,11 +127,11 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=1, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b FAILED
- *::test_c SKIPPED
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b FAILED
+ .*::test_c SKIPPED(?:\s+\(.*\))?
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
@@ -162,8 +162,8 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose", "test_explicit_select.py::test_d")
result.assert_outcomes(passed=0, skipped=1, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
@@ -195,9 +195,9 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=3, skipped=1, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b PASSED
- *::test_c PASSED
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b PASSED
+ .*::test_c PASSED
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
diff --git a/tests/test_03_class.py b/tests/test_03_class.py
index 2ebf811..168b634 100644
--- a/tests/test_03_class.py
+++ b/tests/test_03_class.py
@@ -36,12 +36,12 @@ def test_e(self):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=2, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
- *::TestClass::test_a FAILED
- *::TestClass::test_b PASSED
- *::TestClass::test_c SKIPPED
- *::TestClass::test_d PASSED
- *::TestClass::test_e SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::TestClass::test_a FAILED
+ .*::TestClass::test_b PASSED
+ .*::TestClass::test_c SKIPPED(?:\s+\(.*\))?
+ .*::TestClass::test_d PASSED
+ .*::TestClass::test_e SKIPPED(?:\s+\(.*\))?
""")
@@ -76,12 +76,12 @@ def test_e(self):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=2, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
- *::TestClassNamed::test_a FAILED
- *::TestClassNamed::test_b PASSED
- *::TestClassNamed::test_c SKIPPED
- *::TestClassNamed::test_d PASSED
- *::TestClassNamed::test_e SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::TestClassNamed::test_a FAILED
+ .*::TestClassNamed::test_b PASSED
+ .*::TestClassNamed::test_c SKIPPED(?:\s+\(.*\))?
+ .*::TestClassNamed::test_d PASSED
+ .*::TestClassNamed::test_e SKIPPED(?:\s+\(.*\))?
""")
@@ -114,8 +114,8 @@ def test_b():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=1, skipped=1, failed=1)
- result.stdout.fnmatch_lines("""
- *::test_a FAILED
- *::TestClass::test_a PASSED
- *::test_b SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a FAILED
+ .*::TestClass::test_a PASSED
+ .*::test_b SKIPPED(?:\s+\(.*\))?
""")
diff --git a/tests/test_03_multiple_dependency.py b/tests/test_03_multiple_dependency.py
index aaea86b..a5e585a 100644
--- a/tests/test_03_multiple_dependency.py
+++ b/tests/test_03_multiple_dependency.py
@@ -54,16 +54,16 @@ def test_k():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=5, skipped=5, failed=1)
- result.stdout.fnmatch_lines("""
- *::test_a SKIPPED
- *::test_b FAILED
- *::test_c PASSED
- *::test_d PASSED
- *::test_e PASSED
- *::test_f SKIPPED
- *::test_g SKIPPED
- *::test_h PASSED
- *::test_i SKIPPED
- *::test_j PASSED
- *::test_k SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a SKIPPED(?:\s+\(.*\))?
+ .*::test_b FAILED
+ .*::test_c PASSED
+ .*::test_d PASSED
+ .*::test_e PASSED
+ .*::test_f SKIPPED(?:\s+\(.*\))?
+ .*::test_g SKIPPED(?:\s+\(.*\))?
+ .*::test_h PASSED
+ .*::test_i SKIPPED(?:\s+\(.*\))?
+ .*::test_j PASSED
+ .*::test_k SKIPPED(?:\s+\(.*\))?
""")
diff --git a/tests/test_03_param.py b/tests/test_03_param.py
index 8c0e53d..a7a31b0 100644
--- a/tests/test_03_param.py
+++ b/tests/test_03_param.py
@@ -40,18 +40,18 @@ def test_c(w):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=7, skipped=5, failed=1)
- result.stdout.fnmatch_lines("""
- *::test_a?0-0? PASSED
- *::test_a?0-1? PASSED
- *::test_a?1-0? PASSED
- *::test_a?1-1? FAILED
- *::test_b?1-2? PASSED
- *::test_b?1-3? PASSED
- *::test_b?1-4? SKIPPED
- *::test_b?2-3? PASSED
- *::test_b?2-4? SKIPPED
- *::test_b?3-4? SKIPPED
- *::test_c?1? SKIPPED
- *::test_c?2? SKIPPED
- *::test_c?3? PASSED
+ result.stdout.re_match_lines(r"""
+ .*::test_a\[0-0\] PASSED
+ .*::test_a\[0-1\] PASSED
+ .*::test_a\[1-0\] PASSED
+ .*::test_a\[1-1\] FAILED
+ .*::test_b\[1-2\] PASSED
+ .*::test_b\[1-3\] PASSED
+ .*::test_b\[1-4\] SKIPPED(?:\s+\(.*\))?
+ .*::test_b\[2-3\] PASSED
+ .*::test_b\[2-4\] SKIPPED(?:\s+\(.*\))?
+ .*::test_b\[3-4\] SKIPPED(?:\s+\(.*\))?
+ .*::test_c\[1\] SKIPPED(?:\s+\(.*\))?
+ .*::test_c\[2\] SKIPPED(?:\s+\(.*\))?
+ .*::test_c\[3\] PASSED
""")
diff --git a/tests/test_03_runtime.py b/tests/test_03_runtime.py
index fd35b2b..fb23e2c 100644
--- a/tests/test_03_runtime.py
+++ b/tests/test_03_runtime.py
@@ -32,9 +32,9 @@ def test_d(request):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=1, skipped=3, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b SKIPPED
- *::test_c SKIPPED
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b SKIPPED(?:\s+\(.*\))?
+ .*::test_c SKIPPED(?:\s+\(.*\))?
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
diff --git a/tests/test_03_scope.py b/tests/test_03_scope.py
index ba28377..58aad89 100644
--- a/tests/test_03_scope.py
+++ b/tests/test_03_scope.py
@@ -33,12 +33,12 @@ def test_e():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=2, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_module.py::test_a FAILED
test_scope_module.py::test_b PASSED
- test_scope_module.py::test_c SKIPPED
+ test_scope_module.py::test_c SKIPPED(?:\s+\(.*\))?
test_scope_module.py::test_d PASSED
- test_scope_module.py::test_e SKIPPED
+ test_scope_module.py::test_e SKIPPED(?:\s+\(.*\))?
""")
def test_scope_session(ctestdir):
@@ -102,14 +102,14 @@ def test_h():
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=6, skipped=1, failed=2)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_session_01.py::test_a PASSED
test_scope_session_01.py::test_b FAILED
test_scope_session_01.py::test_c PASSED
test_scope_session_01.py::TestClass::test_b PASSED
test_scope_session_02.py::test_a FAILED
test_scope_session_02.py::test_e PASSED
- test_scope_session_02.py::test_f SKIPPED
+ test_scope_session_02.py::test_f SKIPPED(?:\s+\(.*\))?
test_scope_session_02.py::test_g PASSED
test_scope_session_02.py::test_h PASSED
""")
@@ -174,14 +174,14 @@ def test_h():
ctestdir.makepyfile(**srcs)
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=4, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_package_a/test_01.py::test_a PASSED
test_scope_package_b/test_02.py::test_c PASSED
test_scope_package_b/test_02.py::test_d FAILED
test_scope_package_b/test_03.py::test_e PASSED
- test_scope_package_b/test_03.py::test_f SKIPPED
+ test_scope_package_b/test_03.py::test_f SKIPPED(?:\s+\(.*\))?
test_scope_package_b/test_03.py::test_g PASSED
- test_scope_package_b/test_03.py::test_h SKIPPED
+ test_scope_package_b/test_03.py::test_h SKIPPED(?:\s+\(.*\))?
""")
def test_scope_class(ctestdir):
@@ -236,17 +236,17 @@ def test_h(self):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=5, skipped=3, failed=2)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_class.py::test_a FAILED
test_scope_class.py::test_b PASSED
test_scope_class.py::TestClass1::test_c PASSED
test_scope_class.py::TestClass2::test_a PASSED
test_scope_class.py::TestClass2::test_b FAILED
- test_scope_class.py::TestClass2::test_d SKIPPED
+ test_scope_class.py::TestClass2::test_d SKIPPED(?:\s+\(.*\))?
test_scope_class.py::TestClass2::test_e PASSED
test_scope_class.py::TestClass2::test_f PASSED
- test_scope_class.py::TestClass2::test_g SKIPPED
- test_scope_class.py::TestClass2::test_h SKIPPED
+ test_scope_class.py::TestClass2::test_g SKIPPED(?:\s+\(.*\))?
+ test_scope_class.py::TestClass2::test_h SKIPPED(?:\s+\(.*\))?
""")
def test_scope_nodeid(ctestdir):
@@ -360,21 +360,21 @@ def test_o(self):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=7, skipped=8, failed=0)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_nodeid.py::test_a PASSED
test_scope_nodeid.py::test_b PASSED
- test_scope_nodeid.py::test_c SKIPPED
- test_scope_nodeid.py::test_d SKIPPED
+ test_scope_nodeid.py::test_c SKIPPED(?:\s+\(.*\))?
+ test_scope_nodeid.py::test_d SKIPPED(?:\s+\(.*\))?
test_scope_nodeid.py::test_e PASSED
test_scope_nodeid.py::TestClass::test_f PASSED
test_scope_nodeid.py::TestClass::test_g PASSED
- test_scope_nodeid.py::TestClass::test_h SKIPPED
- test_scope_nodeid.py::TestClass::test_i SKIPPED
- test_scope_nodeid.py::TestClass::test_j SKIPPED
+ test_scope_nodeid.py::TestClass::test_h SKIPPED(?:\s+\(.*\))?
+ test_scope_nodeid.py::TestClass::test_i SKIPPED(?:\s+\(.*\))?
+ test_scope_nodeid.py::TestClass::test_j SKIPPED(?:\s+\(.*\))?
test_scope_nodeid.py::TestClass::test_k PASSED
- test_scope_nodeid.py::TestClass::test_l SKIPPED
- test_scope_nodeid.py::TestClass::test_m SKIPPED
- test_scope_nodeid.py::TestClass::test_n SKIPPED
+ test_scope_nodeid.py::TestClass::test_l SKIPPED(?:\s+\(.*\))?
+ test_scope_nodeid.py::TestClass::test_m SKIPPED(?:\s+\(.*\))?
+ test_scope_nodeid.py::TestClass::test_n SKIPPED(?:\s+\(.*\))?
test_scope_nodeid.py::TestClass::test_o PASSED
""")
@@ -467,19 +467,19 @@ def test_l(self):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=7, skipped=5, failed=0)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_named.py::test_a PASSED
test_scope_named.py::test_b PASSED
- test_scope_named.py::test_c SKIPPED
+ test_scope_named.py::test_c SKIPPED(?:\s+\(.*\))?
test_scope_named.py::test_d PASSED
- test_scope_named.py::test_e SKIPPED
+ test_scope_named.py::test_e SKIPPED(?:\s+\(.*\))?
test_scope_named.py::TestClass::test_f PASSED
test_scope_named.py::TestClass::test_g PASSED
- test_scope_named.py::TestClass::test_h SKIPPED
+ test_scope_named.py::TestClass::test_h SKIPPED(?:\s+\(.*\))?
test_scope_named.py::TestClass::test_i PASSED
- test_scope_named.py::TestClass::test_j SKIPPED
+ test_scope_named.py::TestClass::test_j SKIPPED(?:\s+\(.*\))?
test_scope_named.py::TestClass::test_k PASSED
- test_scope_named.py::TestClass::test_l SKIPPED
+ test_scope_named.py::TestClass::test_l SKIPPED(?:\s+\(.*\))?
""")
def test_scope_dependsfunc(ctestdir):
@@ -578,7 +578,7 @@ def test_d(self, request):
""")
result = ctestdir.runpytest("--verbose")
result.assert_outcomes(passed=10, skipped=3, failed=3)
- result.stdout.fnmatch_lines("""
+ result.stdout.re_match_lines(r"""
test_scope_dependsfunc_01.py::test_a PASSED
test_scope_dependsfunc_01.py::test_b FAILED
test_scope_dependsfunc_01.py::test_c PASSED
@@ -586,13 +586,13 @@ def test_d(self, request):
test_scope_dependsfunc_02.py::test_a FAILED
test_scope_dependsfunc_02.py::test_b PASSED
test_scope_dependsfunc_02.py::test_e PASSED
- test_scope_dependsfunc_02.py::test_f SKIPPED
+ test_scope_dependsfunc_02.py::test_f SKIPPED(?:\s+\(.*\))?
test_scope_dependsfunc_02.py::test_g PASSED
test_scope_dependsfunc_02.py::test_h PASSED
- test_scope_dependsfunc_02.py::test_i SKIPPED
+ test_scope_dependsfunc_02.py::test_i SKIPPED(?:\s+\(.*\))?
test_scope_dependsfunc_02.py::test_j PASSED
test_scope_dependsfunc_02.py::TestClass::test_a PASSED
test_scope_dependsfunc_02.py::TestClass::test_b FAILED
test_scope_dependsfunc_02.py::TestClass::test_c PASSED
- test_scope_dependsfunc_02.py::TestClass::test_d SKIPPED
+ test_scope_dependsfunc_02.py::TestClass::test_d SKIPPED(?:\s+\(.*\))?
""")
diff --git a/tests/test_03_skipmsgs.py b/tests/test_03_skipmsgs.py
index d501285..bfdc833 100644
--- a/tests/test_03_skipmsgs.py
+++ b/tests/test_03_skipmsgs.py
@@ -29,11 +29,11 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose", "-rs")
result.assert_outcomes(passed=1, skipped=2, failed=1)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b FAILED
- *::test_c SKIPPED
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b FAILED
+ .*::test_c SKIPPED(?:\s+\(.*\))?
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
result.stdout.fnmatch_lines_random("""
SKIP* test_c depends on test_b
diff --git a/tests/test_04_automark.py b/tests/test_04_automark.py
index bcc2810..7251405 100644
--- a/tests/test_04_automark.py
+++ b/tests/test_04_automark.py
@@ -23,9 +23,9 @@ def test_b():
""")
result = ctestdir.runpytest("--verbose", "-rs")
result.assert_outcomes(passed=1, skipped=1, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b SKIPPED(?:\s+\(.*\))?
""")
@@ -53,9 +53,9 @@ def test_b():
""")
result = ctestdir.runpytest("--verbose", "-rs")
result.assert_outcomes(passed=1, skipped=1, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b SKIPPED(?:\s+\(.*\))?
""")
@@ -83,7 +83,7 @@ def test_b():
""")
result = ctestdir.runpytest("--verbose", "-rs")
result.assert_outcomes(passed=2, skipped=0, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_a PASSED
- *::test_b PASSED
+ result.stdout.re_match_lines(r"""
+ .*::test_a PASSED
+ .*::test_b PASSED
""")
diff --git a/tests/test_04_ignore_unknown.py b/tests/test_04_ignore_unknown.py
index 3cee600..bc145e5 100644
--- a/tests/test_04_ignore_unknown.py
+++ b/tests/test_04_ignore_unknown.py
@@ -32,8 +32,8 @@ def test_d():
""")
result = ctestdir.runpytest("--verbose", "test_no_ignore.py::test_d")
result.assert_outcomes(passed=0, skipped=1, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_d SKIPPED
+ result.stdout.re_match_lines(r"""
+ .*::test_d SKIPPED(?:\s+\(.*\))?
""")
@@ -67,6 +67,6 @@ def test_d():
result = ctestdir.runpytest("--verbose", "--ignore-unknown-dependency",
"test_ignore.py::test_d")
result.assert_outcomes(passed=1, skipped=0, failed=0)
- result.stdout.fnmatch_lines("""
- *::test_d PASSED
+ result.stdout.re_match_lines(r"""
+ .*::test_d PASSED
""")

View File

@ -0,0 +1,39 @@
-------------------------------------------------------------------
Sun Feb 21 13:36:41 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
- Add pytest6.2.patch to update tests to fix Tumbleweed builds
-------------------------------------------------------------------
Sat Nov 21 15:05:54 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Convert to single spec
-------------------------------------------------------------------
Sun May 17 10:10:26 UTC 2020 - Rolf Krahl <rolf@rotkraut.de>
- Fix: must set PYTHONPATH in %check.
-------------------------------------------------------------------
Fri Feb 14 21:18:19 UTC 2020 - Rolf Krahl <rolf@rotkraut.de>
- Update to 0.5.1.
-------------------------------------------------------------------
Sun Jul 14 19:11:44 UTC 2019 - rolf <rolf@rotkraut.de>
- Rewrote spec file in openSUSE Python single spec flavour.
-------------------------------------------------------------------
Wed Jan 17 22:44:58 UTC 2018 - rolf@rotkraut.de
- Update to 0.3.2.
-------------------------------------------------------------------
Wed Dec 27 13:09:58 UTC 2017 - rolf@rotkraut.de
- Update to 0.3.1.
-------------------------------------------------------------------
Sun May 28 17:52:13 UTC 2017 - rolf@rotkraut.de
- Initial version.

View File

@ -0,0 +1,62 @@
#
# spec file for package python-pytest-dependency
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-dependency
Version: 0.5.1
Release: 0
Summary: Manage dependencies of tests
License: Apache-2.0
URL: https://github.com/RKrahl/pytest-dependency
Source: https://files.pythonhosted.org/packages/source/p/pytest-dependency/pytest-dependency-%{version}.tar.gz
Patch0: https://github.com/RKrahl/pytest-dependency/commit/0930889a.patch#/pytest6.2.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module pytest >= 3.6.0}
# /SECTION
BuildRequires: fdupes
Requires: python-pytest >= 3.6.0
BuildArch: noarch
%python_subpackages
%description
This pytest plugin manages dependencies of tests. It allows to mark
some tests as dependent from other tests. These tests will then be
skipped if any of the dependencies did fail or has been skipped.
%prep
%setup -q -n pytest-dependency-%{version}
%patch0 -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README.rst
%license LICENSE.txt
%{python_sitelib}/*
%changelog