Skip to content

Commit

Permalink
Merge pull request #15 from arkamar/py312-tests
Browse files Browse the repository at this point in the history
Refactor failIf to assertFalse for Python 3.12 Compatibility
  • Loading branch information
cjwatson committed May 31, 2023
2 parents b3f9450 + 7bb62a1 commit 336f6e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testresources/tests/test_resourced_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 336f6e2

Please sign in to comment.