mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-11 13:16:45 +02:00
This patch refactors failIf to assertFalse to fix failing tests. This pkgrel bump is also a rebuild against python 3.12.
34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
Patch-Source: https://github.com/testing-cabal/testresources/pull/15
|
|
--
|
|
From ea4b907fe3805a78018df77f1e43ff0573eb8c56 Mon Sep 17 00:00:00 2001
|
|
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
|
Date: Thu, 4 Jul 2024 11:17:56 +0000
|
|
Subject: [PATCH] Refactor failIf to assertFalse for Python 3.12 Compatibility
|
|
|
|
---
|
|
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 @@ class TestResourcedTestCase(testtools.TestCase):
|
|
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 @@ class TestResourcedTestCase(testtools.TestCase):
|
|
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)
|
|
--
|
|
2.45.2
|
|
|