diff --git a/python-testresources.changes b/python-testresources.changes index 95ad82f..e9e5492 100644 --- a/python-testresources.changes +++ b/python-testresources.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri May 16 06:21:57 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 2.0.2 + * Skip testBasicSortTests in general (Kelledin) + * Add a TestResourceManager.id() API for letting test results + report about a resource identity (freeekanayaka) + * Refactor failIf to assertFalse for Python 3.12 Compatibility (cjwatson) + * Add support for Python >=3.10 (jelmer) +- Drop use-correct-assertions.patch, merged upstream +- Refresh testresources-flaky-tests.patch + ------------------------------------------------------------------- Wed May 8 06:37:08 UTC 2024 - Steve Kowalik diff --git a/python-testresources.spec b/python-testresources.spec index e3405a7..61fb468 100644 --- a/python-testresources.spec +++ b/python-testresources.spec @@ -18,15 +18,13 @@ %{?sle15_python_module_pythons} Name: python-testresources -Version: 2.0.1 +Version: 2.0.2 Release: 0 Summary: A pyunit extension for managing expensive test resources License: (Apache-2.0 OR BSD-3-Clause) AND GPL-2.0-or-later URL: https://github.com/testing-cabal/testresources Source: https://files.pythonhosted.org/packages/source/t/testresources/testresources-%{version}.tar.gz Patch0: testresources-flaky-tests.patch -# PATCH-FIX-UPSTREAM gh#testing-cabal/testresources#15 -Patch1: use-correct-assertions.patch BuildRequires: %{python_module fixtures} BuildRequires: %{python_module pbr} BuildRequires: %{python_module pip} diff --git a/testresources-2.0.1.tar.gz b/testresources-2.0.1.tar.gz deleted file mode 100644 index dc0a89a..0000000 --- a/testresources-2.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee9d1982154a1e212d4e4bac6b610800bfb558e4fb853572a827bc14a96e4417 -size 41948 diff --git a/testresources-2.0.2.tar.gz b/testresources-2.0.2.tar.gz new file mode 100644 index 0000000..28708cf --- /dev/null +++ b/testresources-2.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cbf3d7e00ab2e9fe24b754a102644f6f334244980464c38233b18127f1deaec +size 45057 diff --git a/testresources-flaky-tests.patch b/testresources-flaky-tests.patch index eccaf7f..4ad5d9d 100644 --- a/testresources-flaky-tests.patch +++ b/testresources-flaky-tests.patch @@ -1,12 +1,11 @@ -Index: testresources-2.0.1/testresources/tests/test_optimising_test_suite.py -=================================================================== ---- testresources-2.0.1.orig/testresources/tests/test_optimising_test_suite.py -+++ testresources-2.0.1/testresources/tests/test_optimising_test_suite.py -@@ -498,6 +498,7 @@ class TestGraphStuff(testtools.TestCase) +diff -Nru testresources-2.0.2.orig/testresources/tests/test_optimising_test_suite.py testresources-2.0.2/testresources/tests/test_optimising_test_suite.py +--- testresources-2.0.2.orig/testresources/tests/test_optimising_test_suite.py 2025-04-22 12:21:27.000000000 +0200 ++++ testresources-2.0.2/testresources/tests/test_optimising_test_suite.py 2025-05-16 08:21:08.834763803 +0200 +@@ -537,6 +537,7 @@ permutations.append([case4, case1, case3, case2]) return permutations + @unittest.skip("too flaky") def testBasicSortTests(self): + self.skipTest("flaky, see LP #1645008") # Test every permutation of inputs, with legacy tests. - # Cannot use equal costs because of the use of diff --git a/use-correct-assertions.patch b/use-correct-assertions.patch deleted file mode 100644 index 23aad53..0000000 --- a/use-correct-assertions.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7bb62a13fa1d28717c10f3152b5e8ea479c8e9d2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20Van=C4=9Bk?= -Date: Wed, 31 May 2023 08:40:30 +0200 -Subject: [PATCH] Refactor failIf to assertFalse for Python 3.12 Compatibility -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This commit replaces deprecated failIf calls with assertFalse in the -test_resourced_test_case.py file. The failIf method was removed in -Python 3.12 [1-3]. - -[1] https://docs.python.org/3.12/whatsnew/3.12.html#removed -[2] https://github.com/python/cpython/issues/89325 -[3] https://github.com/python/cpython/pull/28268 - -Signed-off-by: Petr Vaněk ---- - testresources/tests/test_resourced_test_case.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/testresources/tests/test_resourced_test_case.py b/testresources/tests/test_resourced_test_case.py -index 7d2cfba..3c8a1b3 100644 ---- a/testresources/tests/test_resourced_test_case.py -+++ b/testresources/tests/test_resourced_test_case.py -@@ -129,7 +129,7 @@ def testTearDownResourcesDeletesResourceAttributes(self): - self.resourced_case.resources = [("foo", self.resource_manager)] - self.resourced_case.setUpResources() - self.resourced_case.tearDownResources() -- self.failIf(hasattr(self.resourced_case, "foo")) -+ self.assertFalse(hasattr(self.resourced_case, "foo")) - - def testTearDownResourcesStopsUsingResource(self): - # tearDownResources records that there is one less use of each -@@ -158,5 +158,5 @@ def testSingleWithSetup(self): - self.assertEqual(self.resourced_case.foo, self.resource) - self.assertEqual(self.resource_manager._uses, 1) - self.resourced_case.tearDown() -- self.failIf(hasattr(self.resourced_case, "foo")) -+ self.assertFalse(hasattr(self.resourced_case, "foo")) - self.assertEqual(self.resource_manager._uses, 0)