Skip to content

Commit 2fa58f9

Browse files
feat: update python-testscenarios to 0.5.0-6
1 parent 8730b70 commit 2fa58f9

File tree

6 files changed

+144
-0
lines changed

6 files changed

+144
-0
lines changed

debian/changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
python-testscenarios (0.5.0-6) unstable; urgency=medium
2+
3+
* Add testtools-2.8.2-compat.patch (Closes: #1124202).
4+
* Add fix-assertEquals-is-removed.patch.
5+
6+
-- Thomas Goirand <zigo@debian.org> Mon, 29 Dec 2025 10:50:33 +0100
7+
8+
python-testscenarios (0.5.0-5) unstable; urgency=medium
9+
10+
* Add missing pbr (build-)depends (Closes: #1099276).
11+
12+
-- Thomas Goirand <zigo@debian.org> Mon, 03 Mar 2025 16:09:49 +0100
13+
14+
python-testscenarios (0.5.0-4) unstable; urgency=medium
15+
16+
* Add extend-diff-ignore to ignore egg-info (Closes: #1045636).
17+
18+
-- Thomas Goirand <zigo@debian.org> Tue, 15 Aug 2023 15:50:10 +0200
19+
120
python-testscenarios (0.5.0-3) unstable; urgency=medium
221

322
[ Mattia Rizzolo ]

debian/control

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Build-Depends:
99
dh-python,
1010
openstack-pkg-tools (>= 99~),
1111
python3-all,
12+
python3-pbr,
1213
python3-setuptools,
1314
python3-testtools,
1415
Standards-Version: 4.2.0
@@ -19,6 +20,7 @@ Homepage: https://launchpad.net/testscenarios
1920
Package: python3-testscenarios
2021
Architecture: all
2122
Depends:
23+
python3-pbr,
2224
python3-testtools,
2325
${misc:Depends},
2426
${python3:Depends},
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Description: Fix assertEquals is removed
2+
Author: Thomas Goirand <zigo@debian.org>
3+
Bug-Debian: https://bugs.debian.org/1124202
4+
Forwarded: no
5+
Last-Update: 2025-12-29
6+
7+
--- python-testscenarios-0.5.0.orig/testscenarios/tests/test_scenarios.py
8+
+++ python-testscenarios-0.5.0/testscenarios/tests/test_scenarios.py
9+
@@ -193,7 +193,7 @@ class TestLoadTests(testtools.TestCase):
10+
[self.SampleTest('test_nothing')],
11+
None)
12+
result_tests = list(testtools.iterate_tests(suite))
13+
- self.assertEquals(
14+
+ self.assertEqual(
15+
2,
16+
len(result_tests),
17+
result_tests)
18+
@@ -206,7 +206,7 @@ class TestLoadTests(testtools.TestCase):
19+
unittest.TestLoader(),
20+
)
21+
result_tests = list(testtools.iterate_tests(suite))
22+
- self.assertEquals(
23+
+ self.assertEqual(
24+
2,
25+
len(result_tests),
26+
result_tests)

debian/patches/series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
fix-Makefile-to-use-py3.patch
2+
testtools-2.8.2-compat.patch
3+
fix-assertEquals-is-removed.patch
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
Description: Fix compatibility with newer testtools
2+
These no longer provide testtools.tests
3+
Author: Jelmer Vernooij <jelmer@jelmer.uk>
4+
Origin: upstream, https://github.com/testing-cabal/testscenarios/commit/75b76e7d07bc6d415384e668aefb6b887a3aa13d
5+
Bug-Debian: https://bugs.debian.org/1124202
6+
Date: Mon, 22 Dec 2025 20:10:49 +0000
7+
8+
Index: python-testscenarios/testscenarios/tests/test_testcase.py
9+
===================================================================
10+
--- python-testscenarios.orig/testscenarios/tests/test_testcase.py
11+
+++ python-testscenarios/testscenarios/tests/test_testcase.py
12+
@@ -18,10 +18,68 @@ import unittest
13+
14+
import testtools
15+
from testtools.matchers import EndsWith
16+
-from testtools.tests.helpers import LoggingResult
17+
18+
import testscenarios
19+
20+
+class LoggingResult(testtools.TestResult):
21+
+ """TestResult that logs its event to a list."""
22+
+
23+
+ def __init__(self, log):
24+
+ self._events = log
25+
+ super().__init__()
26+
+
27+
+ def startTest(self, test):
28+
+ self._events.append(("startTest", test))
29+
+ super().startTest(test)
30+
+
31+
+ def stop(self):
32+
+ self._events.append("stop")
33+
+ super().stop()
34+
+
35+
+ def stopTest(self, test):
36+
+ self._events.append(("stopTest", test))
37+
+ super().stopTest(test)
38+
+
39+
+ def addFailure(self, test, err=None, details=None):
40+
+ self._events.append(("addFailure", test, err))
41+
+ super().addFailure(test, err, details)
42+
+
43+
+ def addError(self, test, err=None, details=None):
44+
+ self._events.append(("addError", test, err))
45+
+ super().addError(test, err, details)
46+
+
47+
+ def addSkip(self, test, reason=None, details=None):
48+
+ # Extract reason from details if not provided directly
49+
+ if reason is None and details and "reason" in details:
50+
+ reason = details["reason"].as_text()
51+
+ self._events.append(("addSkip", test, reason))
52+
+ super().addSkip(test, reason, details)
53+
+
54+
+ def addSuccess(self, test, details=None):
55+
+ self._events.append(("addSuccess", test))
56+
+ super().addSuccess(test, details)
57+
+
58+
+ def startTestRun(self):
59+
+ self._events.append("startTestRun")
60+
+ super().startTestRun()
61+
+
62+
+ def stopTestRun(self):
63+
+ self._events.append("stopTestRun")
64+
+ super().stopTestRun()
65+
+
66+
+ def done(self):
67+
+ self._events.append("done")
68+
+ super().done()
69+
+
70+
+ def tags(self, new_tags, gone_tags):
71+
+ self._events.append(("tags", new_tags, gone_tags))
72+
+ super().tags(new_tags, gone_tags)
73+
+
74+
+ def time(self, a_datetime):
75+
+ self._events.append(("time", a_datetime))
76+
+ super().time(a_datetime)
77+
+
78+
+
79+
class TestTestWithScenarios(testtools.TestCase):
80+
81+
scenarios = testscenarios.scenarios.per_module_scenarios(
82+
Index: python-testscenarios/testscenarios/tests/test_scenarios.py
83+
===================================================================
84+
--- python-testscenarios.orig/testscenarios/tests/test_scenarios.py
85+
+++ python-testscenarios/testscenarios/tests/test_scenarios.py
86+
@@ -20,7 +20,7 @@ import unittest
87+
import testtools
88+
from testtools.matchers import EndsWith
89+
90+
-from testtools.tests.helpers import LoggingResult
91+
+from testscenarios.tests.test_testcase import LoggingResult
92+
93+
import testscenarios
94+
from testscenarios.scenarios import (

debian/source/options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extend-diff-ignore = "^[^/]*[.]egg-info/"

0 commit comments

Comments
 (0)