import python-zope-testrunner-6.4-4.el10

i10ce changed/i10ce/python-zope-testrunner-6.4-4.el10
Arkady L. Shane 1 month ago
commit 7da8fdc690
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/zope.testrunner-6.4.tar.gz

@ -0,0 +1 @@
b7bc4047ab9c94eabf111e93fb0993397060ce8d SOURCES/zope.testrunner-6.4.tar.gz

@ -0,0 +1,466 @@
From febaab0fbdf5d0a4bd16c27f5c5c641868b9c584 Mon Sep 17 00:00:00 2001
From: dieter <dieter.maurer@online.de>
Date: Sat, 1 Jun 2024 08:55:24 +0200
Subject: [PATCH] use more `...` in doctests to make them pass for Python 3.13
and earlier Python versions
---
.../testrunner/tests/testrunner-colors.rst | 8 ++---
.../testrunner/tests/testrunner-debugging.rst | 2 +-
.../tests/testrunner-edge-cases.rst | 29 +++++----------
.../testrunner/tests/testrunner-errors.rst | 36 +++++++++----------
.../testrunner/tests/testrunner-ex/gcset.py | 17 ++++++---
.../tests/testrunner-gc-after-test.rst | 8 ++---
src/zope/testrunner/tests/testrunner-gc.rst | 2 +-
.../tests/testrunner-layers-ntd.rst | 21 ++++-------
8 files changed, 56 insertions(+), 67 deletions(-)
diff --git a/src/zope/testrunner/tests/testrunner-colors.rst b/src/zope/testrunner/tests/testrunner-colors.rst
index ebf7fbf..be4b864 100644
--- a/src/zope/testrunner/tests/testrunner-colors.rst
+++ b/src/zope/testrunner/tests/testrunner-colors.rst
@@ -82,7 +82,7 @@ A failed test run highlights the failures in red:
Failed doctest test for sample2.sampletests_e.eek
File "testrunner-ex/sample2/sampletests_e.py", line 28, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
{normal}File "{boldblue}testrunner-ex/sample2/sampletests_e.py{normal}", line {boldred}30{normal}, in {boldcyan}sample2.sampletests_e.eek{normal}
Failed example:
{cyan} f(){normal}
@@ -120,7 +120,7 @@ A failed test run highlights the failures in red:
Failed doctest test for e.rst
File "testrunner-ex/sample2/e.rst", line 0
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
{normal}File "{boldblue}testrunner-ex/sample2/e.rst{normal}", line {boldred}4{normal}, in {boldcyan}e.rst{normal}
Failed example:
{cyan} f(){normal}
@@ -189,7 +189,7 @@ colors:
Failed doctest test for pledge.pledge
File "testrunner-ex/pledge.py", line 24, in pledge
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
{normal}File testrunner-ex/pledge.py{normal}", line {boldred}26{normal}, in {boldcyan}pledge.pledge{normal}
Failed example:
{cyan} print_pledge(){normal}
@@ -223,7 +223,7 @@ apart:
Failed doctest test for pledge.pledge
File "testrunner-ex/pledge.py", line 24, in pledge
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
{normal}File testrunner-ex/pledge.py{normal}", line {boldred}26{normal}, in {boldcyan}pledge.pledge{normal}
Failed example:
{cyan} print_pledge(){normal}
diff --git a/src/zope/testrunner/tests/testrunner-debugging.rst b/src/zope/testrunner/tests/testrunner-debugging.rst
index 6f7f0c8..7c74316 100644
--- a/src/zope/testrunner/tests/testrunner-debugging.rst
+++ b/src/zope/testrunner/tests/testrunner-debugging.rst
@@ -36,7 +36,7 @@ runner will enter pdb at that point:
Running zope.testrunner.layer.UnitTests tests:
...
> testrunner-ex/sample3/sampletests_d.py(27)test_set_trace1()
- -> y = x # noqa: F841
+ -> ...
(Pdb) p x
1
(Pdb) c
diff --git a/src/zope/testrunner/tests/testrunner-edge-cases.rst b/src/zope/testrunner/tests/testrunner-edge-cases.rst
index 006ef82..c50ee8b 100644
--- a/src/zope/testrunner/tests/testrunner-edge-cases.rst
+++ b/src/zope/testrunner/tests/testrunner-edge-cases.rst
@@ -93,7 +93,7 @@ Using pdb.set_trace in a function called by an ordinary test:
... # doctest: +ELLIPSIS
Running zope.testrunner.layer.UnitTests tests:...
> testrunner-ex/sample3/sampletests_d.py(47)f()
- -> y = x # noqa: F841
+ -> ...
(Pdb) p x
1
(Pdb) c
@@ -111,11 +111,9 @@ Using pdb.set_trace in a function called by a doctest in a doc string:
Running zope.testrunner.layer.UnitTests tests:
Set up zope.testrunner.layer.UnitTests in N.NNN seconds.
> testrunner-ex/sample3/sampletests_d.py(NNN)f()
- -> y = x # noqa: F841
+ -> ...
(Pdb) n
- --Return--
- > ...->None
- -> y = x # noqa: F841
+ ...
(Pdb) p x
1
(Pdb) c
@@ -133,12 +131,9 @@ Using pdb in a docstring-based doctest
... finally: sys.stdin = real_stdin
Running zope.testrunner.layer.UnitTests tests:
Set up zope.testrunner.layer.UnitTests in N.NNN seconds.
- > <doctest sample3.sampletests_d.set_trace3[1]>(3)?()
- -> y = x
+ ...
(Pdb) n
- --Return--
- > ...->None
- -> y = x
+ ...
(Pdb) p x
1
(Pdb) c
@@ -157,12 +152,9 @@ Using pdb.set_trace in a doc file:
... finally: sys.stdin = real_stdin
Running zope.testrunner.layer.UnitTests tests:
Set up zope.testrunner.layer.UnitTests in N.NNN seconds.
- > <doctest set_trace5.rst[1]>(3)?()
- -> y = x
+ ...
(Pdb) n
- --Return--
- > ...->None
- -> y = x
+ ...
(Pdb) p x
1
(Pdb) c
@@ -181,12 +173,9 @@ Using pdb.set_trace in a function called by a doctest in a doc file:
... finally: sys.stdin = real_stdin
Running zope.testrunner.layer.UnitTests tests:
Set up zope.testrunner.layer.UnitTests in N.NNN seconds.
- > testrunner-ex/sample3/sampletests_d.py(NNN)f()
- -> y = x # noqa: F841
+ ...
(Pdb) n
- --Return--
- > ...->None
- -> y = x # noqa: F841
+ ...
(Pdb) p x
1
(Pdb) c
diff --git a/src/zope/testrunner/tests/testrunner-errors.rst b/src/zope/testrunner/tests/testrunner-errors.rst
index 092d187..65fafb0 100644
--- a/src/zope/testrunner/tests/testrunner-errors.rst
+++ b/src/zope/testrunner/tests/testrunner-errors.rst
@@ -34,7 +34,7 @@ be read only):
Failed doctest test for sample2.sampletests_e.eek
File "testrunner-ex/sample2/sampletests_e.py", line 28, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_e.py", line 30, in sample2.sampletests_e.eek
Failed example:
f()
@@ -70,7 +70,7 @@ be read only):
Failed doctest test for e.rst
File "testrunner-ex/sample2/e.rst", line 0
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/e.rst", line 4, in e.rst
Failed example:
f()
@@ -119,7 +119,7 @@ there'll be a summary of the errors at the end of the test:
Failed doctest test for sample2.sampletests_e.eek
File "testrunner-ex/sample2/sampletests_e.py", line 28, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_e.py", line 30,
in sample2.sampletests_e.eek
Failed example:
@@ -157,7 +157,7 @@ there'll be a summary of the errors at the end of the test:
Failed doctest test for e.rst
File "testrunner-ex/sample2/e.rst", line 0
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/e.rst", line 4, in e.rst
Failed example:
f()
@@ -210,7 +210,7 @@ Similarly for progress output, the progress ticker will be interrupted:
Failed doctest test for sample2.sampletests_e.eek
File "testrunner-ex/sample2/sampletests_e.py", line 28, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_e.py", line 30, in sample2.sampletests_e.eek
Failed example:
f()
@@ -254,7 +254,7 @@ Similarly for progress output, the progress ticker will be interrupted:
Failed doctest test for e.rst
File "testrunner-ex/sample2/e.rst", line 0
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/e.rst", line 4, in e.rst
Failed example:
f()
@@ -467,7 +467,7 @@ examples in the same test to fail. Each failure is reported:
Failed doctest test for sample2.sampletests_1.eek
File "testrunner-ex/sample2/sampletests_1.py", line 17, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 19,
in sample2.sampletests_1.eek
Failed example:
@@ -479,7 +479,7 @@ examples in the same test to fail. Each failure is reported:
File "<doctest sample2.sampletests_1.eek[0]>", line 1, in ?
x = y
NameError: name 'y' is not defined
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 21,
in sample2.sampletests_1.eek
Failed example:
@@ -491,7 +491,7 @@ examples in the same test to fail. Each failure is reported:
File "<doctest sample2.sampletests_1.eek[1]>", line 1, in ?
x
NameError: name 'x' is not defined
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 24,
in sample2.sampletests_1.eek
Failed example:
@@ -524,7 +524,7 @@ me the first failed example in a doctest" :)
Failed doctest test for sample2.sampletests_1.eek
File "testrunner-ex/sample2/sampletests_1.py", line 17, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 19,
in sample2.sampletests_1.eek
Failed example:
@@ -557,7 +557,7 @@ The --hide-secondary-failures option is an alias for -1:
Failed doctest test for sample2.sampletests_1.eek
File "testrunner-ex/sample2/sampletests_1.py", line 17, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 19, in sample2.sampletests_1.eek
Failed example:
x = y
@@ -592,7 +592,7 @@ command-line options in sys.argv.
Failed doctest test for sample2.sampletests_1.eek
File "testrunner-ex/sample2/sampletests_1.py", line 17, in eek
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 19, in sample2.sampletests_1.eek
Failed example:
x = y
@@ -603,7 +603,7 @@ command-line options in sys.argv.
File "<doctest sample2.sampletests_1.eek[0]>", line 1, in ?
x = y
NameError: name 'y' is not defined
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 21, in sample2.sampletests_1.eek
Failed example:
x
@@ -614,7 +614,7 @@ command-line options in sys.argv.
File "<doctest sample2.sampletests_1.eek[1]>", line 1, in ?
x
NameError: name 'x' is not defined
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/sample2/sampletests_1.py", line 24, in sample2.sampletests_1.eek
Failed example:
z = x + 1
@@ -650,7 +650,7 @@ kinds.
Failed doctest test for pledge.pledge
File "testrunner-ex/pledge.py", line 24, in pledge
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/pledge.py", line 26, in pledge.pledge
Failed example:
print_pledge()
@@ -692,7 +692,7 @@ caret marking the mismatching column positions.
Failed doctest test for pledge.pledge
File "testrunner-ex/pledge.py", line 24, in pledge
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/pledge.py", line 26, in pledge.pledge
Failed example:
print_pledge()
@@ -721,7 +721,7 @@ The -udiff option requests a standard "unified" diff:
Failed doctest test for pledge.pledge
File "testrunner-ex/pledge.py", line 24, in pledge
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/pledge.py", line 26, in pledge.pledge
Failed example:
print_pledge()
@@ -748,7 +748,7 @@ The -cdiff option requests a standard "context" diff:
Failed doctest test for pledge.pledge
File "testrunner-ex/pledge.py", line 24, in pledge
<BLANKLINE>
- ----------------------------------------------------------------------
+ ...
File "testrunner-ex/pledge.py", line 26, in pledge.pledge
Failed example:
print_pledge()
diff --git a/src/zope/testrunner/tests/testrunner-ex/gcset.py b/src/zope/testrunner/tests/testrunner-ex/gcset.py
index ca0b71d..8c1801e 100644
--- a/src/zope/testrunner/tests/testrunner-ex/gcset.py
+++ b/src/zope/testrunner/tests/testrunner-ex/gcset.py
@@ -12,14 +12,21 @@
#
##############################################################################
import doctest
+import sys
+
+
+PY313 = sys.version_info[:2] >= (3, 13)
def make_sure_gc_threshold_is_701_11_9():
- """
- >>> import gc
- >>> gc.get_threshold()
- (701, 11, 9)
- """
+ pass
+
+
+make_sure_gc_threshold_is_701_11_9.__doc__ = """\
+>>> import gc
+>>> gc.get_threshold()
+(701, 11, %d)
+""" % (0 if PY313 else 9)
def test_suite():
diff --git a/src/zope/testrunner/tests/testrunner-gc-after-test.rst b/src/zope/testrunner/tests/testrunner-gc-after-test.rst
index d21d571..15a0529 100644
--- a/src/zope/testrunner/tests/testrunner-gc-after-test.rst
+++ b/src/zope/testrunner/tests/testrunner-gc-after-test.rst
@@ -85,6 +85,10 @@ therefore does not show the warnings (even though two are issued).
test_failure (gc-after-test.GcAfterTestTests...)
Verbosity level 4 (or higher)
+ Note: starting with Python 3.13, the garbage collector identifies
+ an instance and its ``__dict__``; as a consequence, cycles
+ appear smaller than in preceding versions (not
+ mentioning the involved ``__dict__``s).
>>> sys.argv = 'test --gc-after-test -vvvv'.split()
>>> _ = testrunner.run_internal(defaults)
Running tests at level 1
@@ -95,13 +99,11 @@ therefore does not show the warnings (even though two are issued).
The following test left cyclic garbage behind:
test_cycle_with_resource (gc-after-test.GcAfterTestTests...)
Cycle 1
- * ...
* ...
test_cycle_without_resource (gc-after-test.GcAfterTestTests...) (N.NNN s) [2]
The following test left cyclic garbage behind:
test_cycle_without_resource (gc-after-test.GcAfterTestTests...)
Cycle 1
- * ...
* ...
test_exception (gc-after-test.GcAfterTestTests...) (N.NNN s)
<BLANKLINE>
@@ -122,13 +124,11 @@ therefore does not show the warnings (even though two are issued).
The following test left cyclic garbage behind:
test_test_holds_cycle (gc-after-test.GcAfterTestTests...)
Cycle 1
- * ...
* ...
test_traceback_cycle (gc-after-test.GcAfterTestTests...) (N.NNN s) [5]
The following test left cyclic garbage behind:
test_traceback_cycle (gc-after-test.GcAfterTestTests...)
Cycle 1
- * ...
* ...
Ran 7 tests with 1 failures, 1 errors and 0 skipped in N.NNN seconds.
Tearing down left over layers:
diff --git a/src/zope/testrunner/tests/testrunner-gc.rst b/src/zope/testrunner/tests/testrunner-gc.rst
index bea3305..be061d7 100644
--- a/src/zope/testrunner/tests/testrunner-gc.rst
+++ b/src/zope/testrunner/tests/testrunner-gc.rst
@@ -112,4 +112,4 @@ The output statistics are written to standard error.
>>> sys.stderr = stderr
>>> print(err.getvalue()) # doctest: +ELLIPSIS
- gc: collecting generation ...
+ gc: collect...
diff --git a/src/zope/testrunner/tests/testrunner-layers-ntd.rst b/src/zope/testrunner/tests/testrunner-layers-ntd.rst
index 7e65d09..d990351 100644
--- a/src/zope/testrunner/tests/testrunner-layers-ntd.rst
+++ b/src/zope/testrunner/tests/testrunner-layers-ntd.rst
@@ -167,8 +167,7 @@ that is run as a subprocess:
Tear down sample1.sampletests_ntds.Layer ... not supported
Running in a subprocess.
Set up sample2.sampletests_ntds.Layer in 0.000 seconds.
- --Return--
- > testrunner-ex/sample2/sampletests_ntds.py(37)test_something()->None
+ ...> testrunner-ex/sample2/sampletests_ntds.py(37)test_something()->None
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>
@@ -176,8 +175,7 @@ that is run as a subprocess:
Can't use pdb.set_trace when running a layer as a subprocess!
**********************************************************************
<BLANKLINE>
- --Return--
- > testrunner-ex/sample2/sampletests_ntds.py(40)test_something2()->None
+ ...> testrunner-ex/sample2/sampletests_ntds.py(40)test_something2()->None
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>
@@ -185,8 +183,7 @@ that is run as a subprocess:
Can't use pdb.set_trace when running a layer as a subprocess!
**********************************************************************
<BLANKLINE>
- --Return--
- > testrunner-ex/sample2/sampletests_ntds.py(43)test_something3()->None
+ ...> testrunner-ex/sample2/sampletests_ntds.py(43)test_something3()->None
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>
@@ -194,8 +191,7 @@ that is run as a subprocess:
Can't use pdb.set_trace when running a layer as a subprocess!
**********************************************************************
<BLANKLINE>
- --Return--
- > testrunner-ex/sample2/sampletests_ntds.py(46)test_something4()->None
+ ...> testrunner-ex/sample2/sampletests_ntds.py(46)test_something4()->None
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>
@@ -203,8 +199,7 @@ that is run as a subprocess:
Can't use pdb.set_trace when running a layer as a subprocess!
**********************************************************************
<BLANKLINE>
- --Return--
- > testrunner-ex/sample2/sampletests_ntds.py(52)f()->None
+ ...> testrunner-ex/sample2/sampletests_ntds.py(52)f()->None
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>
@@ -212,8 +207,7 @@ that is run as a subprocess:
Can't use pdb.set_trace when running a layer as a subprocess!
**********************************************************************
<BLANKLINE>
- --Return--
- > <doctest sample2.sampletests_ntds.test_set_trace[0]>(3)?()
+ ...> <doctest sample2.sampletests_ntds.test_set_trace[0]>(3)?()
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>
@@ -221,8 +215,7 @@ that is run as a subprocess:
Can't use pdb.set_trace when running a layer as a subprocess!
**********************************************************************
<BLANKLINE>
- --Return--
- > testrunner-ex/sample2/sampletests_ntds.py(NNN)f()
+ ...> testrunner-ex/sample2/sampletests_ntds.py(NNN)f()
-> import pdb; pdb.set_trace()
(Pdb) c
<BLANKLINE>

@ -0,0 +1,93 @@
From e2d4885440367f66df9231a00a5d36ee1374c79d Mon Sep 17 00:00:00 2001
From: dieter <dieter.maurer@online.de>
Date: Mon, 3 Jun 2024 10:31:24 +0200
Subject: [PATCH 1/2] fix `subunit` tests for Python 3.13
---
src/zope/testrunner/tests/test_doctest.py | 6 ++++++
src/zope/testrunner/tests/testrunner-subunit-v2.rst | 2 +-
src/zope/testrunner/tests/testrunner-subunit.rst | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/zope/testrunner/tests/test_doctest.py b/src/zope/testrunner/tests/test_doctest.py
index 14a5a52..ef8d486 100644
--- a/src/zope/testrunner/tests/test_doctest.py
+++ b/src/zope/testrunner/tests/test_doctest.py
@@ -86,6 +86,9 @@
re.MULTILINE),
r''),
# (re.compile('^> [^\n]+->None$', re.M), '> ...->None'),
+
+ # disregard trailing whitespace
+ (re.compile(r'\s*$'), ''),
])
else:
# *nix
@@ -132,6 +135,9 @@
r'(/__init__)?.py{\w+}", [^\n]+\n[^\n]+\n',
re.MULTILINE),
r''),
+
+ # disregard trailing whitespace
+ (re.compile(r'\s*$', re.MULTILINE), ''),
])
diff --git a/src/zope/testrunner/tests/testrunner-subunit-v2.rst b/src/zope/testrunner/tests/testrunner-subunit-v2.rst
index 2263a1a..71feb97 100644
--- a/src/zope/testrunner/tests/testrunner-subunit-v2.rst
+++ b/src/zope/testrunner/tests/testrunner-subunit-v2.rst
@@ -458,7 +458,7 @@ Let's run tests including a module with some bad syntax:
Traceback (most recent call last):
File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 17, in <module>
class Test(unittest.TestCase):
- File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 22, in Test
+ ...
raise TypeError('eek')
TypeError: eek
<BLANKLINE>
diff --git a/src/zope/testrunner/tests/testrunner-subunit.rst b/src/zope/testrunner/tests/testrunner-subunit.rst
index 9907f91..44d4488 100644
--- a/src/zope/testrunner/tests/testrunner-subunit.rst
+++ b/src/zope/testrunner/tests/testrunner-subunit.rst
@@ -495,7 +495,7 @@ Let's run tests including a module with some bad syntax:
Traceback (most recent call last):
File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 17, in <module>
class Test(unittest.TestCase):
- File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 22, in Test
+ ...
raise TypeError('eek')
TypeError: eek
]
From aa0c0c2fc8b1a103fe87a288b31a2d148e2c55a5 Mon Sep 17 00:00:00 2001
From: dieter <dieter.maurer@online.de>
Date: Mon, 3 Jun 2024 11:06:25 +0200
Subject: [PATCH 2/2] optimize trailing whitespace re
---
src/zope/testrunner/tests/test_doctest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/zope/testrunner/tests/test_doctest.py b/src/zope/testrunner/tests/test_doctest.py
index ef8d486..f73f924 100644
--- a/src/zope/testrunner/tests/test_doctest.py
+++ b/src/zope/testrunner/tests/test_doctest.py
@@ -88,7 +88,7 @@
# (re.compile('^> [^\n]+->None$', re.M), '> ...->None'),
# disregard trailing whitespace
- (re.compile(r'\s*$'), ''),
+ (re.compile(r'\s+$'), ''),
])
else:
# *nix
@@ -137,7 +137,7 @@
r''),
# disregard trailing whitespace
- (re.compile(r'\s*$', re.MULTILINE), ''),
+ (re.compile(r'\s+$', re.MULTILINE), ''),
])

@ -0,0 +1,335 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 4;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# We have source files with intentional syntax errors, in order to test.
# Do not fail the build just because some file is not valid python.
%undefine _python_bytecompile_errors_terminate_build
%global _docdir_fmt python3-zope-testrunner
Name: python-zope-testrunner
Version: 6.4
Release: %autorelease
Summary: Zope testrunner script
License: ZPL-2.1
URL: https://pypi.python.org/pypi/zope.testrunner
VCS: https://github.com/zopefoundation/zope.testrunner
Source0: %{vcs}/archive/%{version}/zope.testrunner-%{version}.tar.gz
# Use more ... in doctests to make them pass for Python 3.13, merged upstream
Patch: https://github.com/zopefoundation/zope.testrunner/pull/172.patch
# Fix subunit tests for Python 3.13, merged upstream
Patch: https://github.com/zopefoundation/zope.testrunner/pull/173.patch
BuildArch: noarch
BuildRequires: help2man
BuildRequires: python3-devel
BuildRequires: python3-docs
BuildRequires: %{py3_dist manuel}
%description
This package provides a flexible test runner with layer support.
%package -n python3-zope-testrunner
Summary: Zope testrunner script
%description -n python3-zope-testrunner
This package provides a flexible test runner with layer support.
%package doc
# The content is ZPL-2.1. Files added by Sphinx have the following licences:
# searchindex.js: BSD-2-Clause
# _static/*: BSD-2-Clause, except for the following:
# _static/jquery*.js: MIT
# _static/underscore*.js: MIT
License: ZPL-2.1 AND BSD-2-Clause AND MIT
Summary: Documentation for zope.testrunner
%description doc
Documentation for zope.testrunner.
%pyproject_extras_subpkg -n python3-zope-testrunner subunit
%prep
%autosetup -n zope.testrunner-%{version} -p1
# Update the sphinx HTML theme name
sed -i "s/'default'/'classic'/" docs/conf.py
# Fix the way python is invoked
sed -i 's/python -m/python3 -m/' docs/cli.rst
# Use local objects.inv for intersphinx
sed -i "s|\('https://docs\.python\.org/': \)None|\1'%{_docdir}/python3-docs/html/objects.inv'|" docs/conf.py
# Replace a deprecated directive
sed -i "s/autodoc_default_flags.*/autodoc_default_options = {'members': True, 'show-inheritance': True}/" docs/conf.py
%generate_buildrequires
%pyproject_buildrequires -t -x test,subunit,docs
%build
%pyproject_wheel
rst2html --no-datestamp CHANGES.rst CHANGES.html
rst2html --no-datestamp README.rst README.html
# Not really RST: https://github.com/zopefoundation/zope.testrunner/issues/100
cp -p COPYRIGHT.rst COPYRIGHT
%install
%pyproject_install
mkdir -p %{buildroot}%{_mandir}/man1
PYTHONPATH=%{buildroot}%{python3_sitelib} \
help2man -s 1 -o %{buildroot}%{_mandir}/man1/zope-testrunner.1 \
-N -n "Zope testrunner script" %{buildroot}%{_bindir}/zope-testrunner
# The Sphinx documentation cannot be built with an uninstalled zope.testrunner
# because python finds the installed zope package, which doesn't contain
# testrunner. We fake out python by copying the entire installed tree to a
# local directory and adding this package inside the zope directory.
mkdir lib
cp -a %{_prefix}/lib/python%{python3_version} lib
if [ -d %{_prefix}/lib64/python%{python3_version} ]; then
mkdir lib64
cp -a %{_prefix}/lib64/python%{python3_version} lib64
fi
mkdir include
cp -a %{_includedir}/python%{python3_version}* include
cp -a %{buildroot}%{python3_sitelib}/zope* \
lib/python%{python3_version}/site-packages
export PYTHONHOME=$PWD:$PWD
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
rm -fr include lib lib64
rm -f docs/_build/html/.buildinfo
unset PYTHONHOME
%check
%tox
%files -n python3-zope-testrunner
%doc CHANGES.html README.html
%license COPYRIGHT LICENSE.md
%{_bindir}/zope-testrunner
%{_mandir}/man1/zope-testrunner.1*
%{python3_sitelib}/zope.testrunner*
%{python3_sitelib}/zope/testrunner/
%exclude %{python3_sitelib}/zope/testrunner/tests
%files doc
%doc docs/_build/html
%changelog
* Sat Jan 04 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 6.4-4
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 6.4-3
- Rebuilt for Python 3.13
* Mon Jun 03 2024 Miro Hrončok <miro@hroncok.cz> - 6.4-2
- Fix build with Python 3.13
- Fixes: rhbz#2251779
* Tue Feb 27 2024 Jerry James <loganjerry@gmail.com> - 6.4-1
- Version 6.4
* Mon Feb 12 2024 Jerry James <loganjerry@gmail.com> - 6.3.1-1
- Version 6.3.1
- Drop workaround for bug in version 6.3
* Wed Feb 7 2024 Jerry James <loganjerry@gmail.com> - 6.3-1
- Version 6.3
- Drop upstreamed patches
- BR python3-manuel to enable more tests
- Test with tox
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Dec 22 2023 Jerry James <loganjerry@gmail.com> - 6.2.1-1
- Version 6.2.1
* Tue Dec 12 2023 Jerry James <loganjerry@gmail.com> - 6.2-2
- Add patch for python 3.13 compatibility
* Wed Nov 8 2023 Jerry James <loganjerry@gmail.com> - 6.2-1
- Version 6.2
* Tue Aug 29 2023 Jerry James <loganjerry@gmail.com> - 6.1-1
- Version 6.1
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 16 2023 Jerry James <loganjerry@gmail.com> - 6.0-2
- Add patch to work around a test failure with python 3.12
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 6.0-2
- Rebuilt for Python 3.12
* Tue Mar 28 2023 Jerry James <loganjerry@gmail.com> - 6.0-1
- Version 6.0
* Thu Feb 23 2023 Jerry James <loganjerry@gmail.com> - 5.6-3
- Create subunit extras subpackage
- Dynamically generate BuildRequires
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 9 2022 Jerry James <loganjerry@gmail.com> - 5.6-1
- Version 5.6
* Wed Sep 7 2022 Jerry James <loganjerry@gmail.com> - 5.5.1-1
- Version 5.5.1
- Convert License tag to SPDX
- Add -doc subpackage
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jun 24 2022 Jerry James <loganjerry@gmail.com> - 5.5-1
- Version 5.5
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 5.4.0-3
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Nov 19 2021 Jerry James <loganjerry@gmail.com> - 5.4.0-1
- Version 5.4.0
- Drop upstreamed -whitespace and -syntax patches
* Mon Oct 11 2021 Jerry James <loganjerry@gmail.com> - 5.3.0-5
- Use the latest python macros
- Simplify %%check
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 5.3.0-3
- Rebuilt for Python 3.10
* Mon May 10 2021 Jerry James <loganjerry@gmail.com> - 5.3.0-2
- Add -syntax patch for python 3.10
* Wed Mar 17 2021 Jerry James <loganjerry@gmail.com> - 5.3.0-1
- Version 5.3.0
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 29 2020 Jerry James <loganjerry@gmail.com> - 5.2-1
- Version 5.2
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 5.1-4
- Rebuilt for Python 3.9
* Sun Mar 1 2020 Jerry James <loganjerry@gmail.com> - 5.1-3
- Add -whitespace patch
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Oct 21 2019 Jerry James <loganjerry@gmail.com> - 5.1-1
- New upstream version
- Fix cross-reference links in the documentation
* Mon Sep 16 2019 Jerry James <loganjerry@gmail.com> - 5.0-4
- Drop the python2 subpackage (bz 1752151)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 5.0-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Mar 19 2019 Jerry James <loganjerry@gmail.com> - 5.0-1
- New upstream version
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Nov 26 2018 Jerry James <loganjerry@gmail.com> - 4.9.2-1
- New upstream version
* Mon Nov 26 2018 Lumír Balhar <lbalhar@redhat.com> - 4.9-2
- Fix issue with automatic dependencies and executables' names
* Sat Nov 17 2018 Jerry James <loganjerry@gmail.com> - 4.9-1
- New upstream version
- Do not ship the tests
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.8.1-3
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Nov 12 2017 Jerry James <loganjerry@gmail.com> - 4.8.1-1
- New upstream version
* Sat Nov 11 2017 Jerry James <loganjerry@gmail.com> - 4.8.0-1
- New upstream version
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue May 30 2017 Jerry James <loganjerry@gmail.com> - 4.7.0-1
- New upstream version
- subunit is no longer a dependency
- Enable python 3 tests
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Dec 28 2016 Jerry James <loganjerry@gmail.com> - 4.6.0-1
- New upstream version
- Drop upstreamed test patch
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.5.1-4
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue Jun 21 2016 Jerry James <loganjerry@gmail.com> - 4.5.1-2
- Fix spurious build failures due to use of _libdir in a noarch package
* Mon Jun 20 2016 Jerry James <loganjerry@gmail.com> - 4.5.1-1
- New upstream version
* Wed Jun 8 2016 Jerry James <loganjerry@gmail.com> - 4.5.0-3
- Do not test with detox; it downloads files at build time
* Wed Jun 1 2016 Jerry James <loganjerry@gmail.com> - 4.5.0-2
- Fix directory ownership
- Add man page
* Wed Jun 1 2016 Jerry James <loganjerry@gmail.com> - 4.5.0-1
- Initial RPM
## END: Generated by rpmautospec
Loading…
Cancel
Save