testresources autopkgtest fails against Python 3.12

Bug #2045302 reported by Olivier Gayot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testresources
Fix Released
Undecided
Unassigned
testresources (Debian)
Fix Released
Unknown
testresources (Ubuntu)
Fix Released
Undecided
Dan Bungert

Bug Description

Running autopkgtest against Python 3.12 fails with:

418s <frozen runpy>:128: RuntimeWarning: 'testtools.run' found in sys.modules after import of package 'testtools', but prior to execution of 'testtools.run'; this may result in unpredictable behaviour
418s Tests running...
418s ======================================================================
418s ERROR: testresources.tests.test_resourced_test_case.TestResourcedTestCase.testSingleWithSetup
418s ----------------------------------------------------------------------
418s Traceback (most recent call last):
418s File "/tmp/autopkgtest.WAKmYE/build.QE6/src/testresources/tests/test_resourced_test_case.py", line 161, in testSingleWithSetup
418s self.failIf(hasattr(self.resourced_case, "foo"))
418s ^^^^^^^^^^^
418s AttributeError: 'TestResourcedTestCase' object has no attribute 'failIf'. Did you mean: 'fail'?
418s ======================================================================
418s ERROR: testresources.tests.test_resourced_test_case.TestResourcedTestCase.testTearDownResourcesDeletesResourceAttributes
418s ----------------------------------------------------------------------
418s Traceback (most recent call last):
418s File "/tmp/autopkgtest.WAKmYE/build.QE6/src/testresources/tests/test_resourced_test_case.py", line 132, in testTearDownResourcesDeletesResourceAttributes
418s self.failIf(hasattr(self.resourced_case, "foo"))
418s ^^^^^^^^^^^
418s AttributeError: 'TestResourcedTestCase' object has no attribute 'failIf'. Did you mean: 'fail'?

failIs was a deprecated alias for assertFalse. Let's use assertFalse instead.

Revision history for this message
Olivier Gayot (ogayot) wrote :

Attaching debdiff.

Package uploaded to https://launchpad.net/~ogayot/+archive/ubuntu/noble-proposed/

Green autopkgtest run locally.

Olivier Gayot (ogayot)
tags: added: update-excuse
Changed in testresources (Debian):
status: Unknown → New
Olivier Gayot (ogayot)
Changed in testresources (Ubuntu):
status: New → In Progress
Changed in testresources:
status: New → Fix Released
Revision history for this message
Dan Bungert (dbungert) wrote :

Uploaded, thanks!

Changed in testresources (Ubuntu):
assignee: nobody → Dan Bungert (dbungert)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package testresources - 2.0.1-4ubuntu1

---------------
testresources (2.0.1-4ubuntu1) noble; urgency=medium

  * Fix test-suite so it can run with Python 3.12. (LP: #2045302)

 -- Olivier Gayot <email address hidden> Thu, 30 Nov 2023 18:59:39 +0100

Changed in testresources (Ubuntu):
status: Fix Committed → Fix Released
Changed in testresources (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.