diff --git a/debian/changelog b/debian/changelog index 8ed27b4..88cef70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,22 @@ +python-testscenarios (0.5.0-6) unstable; urgency=medium + + * Add testtools-2.8.2-compat.patch (Closes: #1124202). + * Add fix-assertEquals-is-removed.patch. + + -- Thomas Goirand Mon, 29 Dec 2025 10:50:33 +0100 + +python-testscenarios (0.5.0-5) unstable; urgency=medium + + * Add missing pbr (build-)depends (Closes: #1099276). + + -- Thomas Goirand Mon, 03 Mar 2025 16:09:49 +0100 + +python-testscenarios (0.5.0-4) unstable; urgency=medium + + * Add extend-diff-ignore to ignore egg-info (Closes: #1045636). + + -- Thomas Goirand Tue, 15 Aug 2023 15:50:10 +0200 + python-testscenarios (0.5.0-3) unstable; urgency=medium [ Mattia Rizzolo ] diff --git a/debian/control b/debian/control index a19edd2..9095acf 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,7 @@ Build-Depends: dh-python, openstack-pkg-tools (>= 99~), python3-all, + python3-pbr, python3-setuptools, python3-testtools, Standards-Version: 4.2.0 @@ -19,6 +20,7 @@ Homepage: https://launchpad.net/testscenarios Package: python3-testscenarios Architecture: all Depends: + python3-pbr, python3-testtools, ${misc:Depends}, ${python3:Depends}, diff --git a/debian/patches/fix-assertEquals-is-removed.patch b/debian/patches/fix-assertEquals-is-removed.patch new file mode 100644 index 0000000..f89ce8b --- /dev/null +++ b/debian/patches/fix-assertEquals-is-removed.patch @@ -0,0 +1,26 @@ +Description: Fix assertEquals is removed +Author: Thomas Goirand +Bug-Debian: https://bugs.debian.org/1124202 +Forwarded: no +Last-Update: 2025-12-29 + +--- python-testscenarios-0.5.0.orig/testscenarios/tests/test_scenarios.py ++++ python-testscenarios-0.5.0/testscenarios/tests/test_scenarios.py +@@ -193,7 +193,7 @@ class TestLoadTests(testtools.TestCase): + [self.SampleTest('test_nothing')], + None) + result_tests = list(testtools.iterate_tests(suite)) +- self.assertEquals( ++ self.assertEqual( + 2, + len(result_tests), + result_tests) +@@ -206,7 +206,7 @@ class TestLoadTests(testtools.TestCase): + unittest.TestLoader(), + ) + result_tests = list(testtools.iterate_tests(suite)) +- self.assertEquals( ++ self.assertEqual( + 2, + len(result_tests), + result_tests) diff --git a/debian/patches/series b/debian/patches/series index 678353b..412f92c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ fix-Makefile-to-use-py3.patch +testtools-2.8.2-compat.patch +fix-assertEquals-is-removed.patch diff --git a/debian/patches/testtools-2.8.2-compat.patch b/debian/patches/testtools-2.8.2-compat.patch new file mode 100644 index 0000000..90e3193 --- /dev/null +++ b/debian/patches/testtools-2.8.2-compat.patch @@ -0,0 +1,94 @@ +Description: Fix compatibility with newer testtools + These no longer provide testtools.tests +Author: Jelmer Vernooij +Origin: upstream, https://github.com/testing-cabal/testscenarios/commit/75b76e7d07bc6d415384e668aefb6b887a3aa13d +Bug-Debian: https://bugs.debian.org/1124202 +Date: Mon, 22 Dec 2025 20:10:49 +0000 + +Index: python-testscenarios/testscenarios/tests/test_testcase.py +=================================================================== +--- python-testscenarios.orig/testscenarios/tests/test_testcase.py ++++ python-testscenarios/testscenarios/tests/test_testcase.py +@@ -18,10 +18,68 @@ import unittest + + import testtools + from testtools.matchers import EndsWith +-from testtools.tests.helpers import LoggingResult + + import testscenarios + ++class LoggingResult(testtools.TestResult): ++ """TestResult that logs its event to a list.""" ++ ++ def __init__(self, log): ++ self._events = log ++ super().__init__() ++ ++ def startTest(self, test): ++ self._events.append(("startTest", test)) ++ super().startTest(test) ++ ++ def stop(self): ++ self._events.append("stop") ++ super().stop() ++ ++ def stopTest(self, test): ++ self._events.append(("stopTest", test)) ++ super().stopTest(test) ++ ++ def addFailure(self, test, err=None, details=None): ++ self._events.append(("addFailure", test, err)) ++ super().addFailure(test, err, details) ++ ++ def addError(self, test, err=None, details=None): ++ self._events.append(("addError", test, err)) ++ super().addError(test, err, details) ++ ++ def addSkip(self, test, reason=None, details=None): ++ # Extract reason from details if not provided directly ++ if reason is None and details and "reason" in details: ++ reason = details["reason"].as_text() ++ self._events.append(("addSkip", test, reason)) ++ super().addSkip(test, reason, details) ++ ++ def addSuccess(self, test, details=None): ++ self._events.append(("addSuccess", test)) ++ super().addSuccess(test, details) ++ ++ def startTestRun(self): ++ self._events.append("startTestRun") ++ super().startTestRun() ++ ++ def stopTestRun(self): ++ self._events.append("stopTestRun") ++ super().stopTestRun() ++ ++ def done(self): ++ self._events.append("done") ++ super().done() ++ ++ def tags(self, new_tags, gone_tags): ++ self._events.append(("tags", new_tags, gone_tags)) ++ super().tags(new_tags, gone_tags) ++ ++ def time(self, a_datetime): ++ self._events.append(("time", a_datetime)) ++ super().time(a_datetime) ++ ++ + class TestTestWithScenarios(testtools.TestCase): + + scenarios = testscenarios.scenarios.per_module_scenarios( +Index: python-testscenarios/testscenarios/tests/test_scenarios.py +=================================================================== +--- python-testscenarios.orig/testscenarios/tests/test_scenarios.py ++++ python-testscenarios/testscenarios/tests/test_scenarios.py +@@ -20,7 +20,7 @@ import unittest + import testtools + from testtools.matchers import EndsWith + +-from testtools.tests.helpers import LoggingResult ++from testscenarios.tests.test_testcase import LoggingResult + + import testscenarios + from testscenarios.scenarios import ( diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..cb61fa5 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/"