diff --git a/tests/unit/utils.py b/tests/unit/utils.py index ba834665d..f522c13f2 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -450,6 +450,13 @@ def setUp(self): else: LoggingManager().start(level=logging.WARNING) + def _addDuration(self, *args, **kwargs): # For Python >= 3.12 + """ Python 3.12 needs subclasses of unittest.TestCase to implement + this in order to record times and execute any cleanup actions once + a test completes regardless of success. Otherwise it emits a warning. + This generic implementation helps suppress it and possibly others in + the future. """ + def tearDown(self): LoggingManager().stop() HotSOSConfig.reset()