bpo-46877: export unittest.doModuleCleanups in unittest package (#31613)

This commit is contained in:
Kumar Aditya 2022-03-04 00:11:28 +05:30 committed by GitHub
parent b35603532b
commit cc400585fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -49,7 +49,7 @@ __all__ = ['TestResult', 'TestCase', 'IsolatedAsyncioTestCase', 'TestSuite',
'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless', 'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless',
'expectedFailure', 'TextTestResult', 'installHandler', 'expectedFailure', 'TextTestResult', 'installHandler',
'registerResult', 'removeResult', 'removeHandler', 'registerResult', 'removeResult', 'removeHandler',
'addModuleCleanup'] 'addModuleCleanup', 'doModuleCleanups']
# Expose obsolete functions for backwards compatibility # Expose obsolete functions for backwards compatibility
# bpo-5846: Deprecated in Python 3.11, scheduled for removal in Python 3.13. # bpo-5846: Deprecated in Python 3.11, scheduled for removal in Python 3.13.
@ -59,7 +59,7 @@ __unittest = True
from .result import TestResult from .result import TestResult
from .case import (addModuleCleanup, TestCase, FunctionTestCase, SkipTest, skip, from .case import (addModuleCleanup, TestCase, FunctionTestCase, SkipTest, skip,
skipIf, skipUnless, expectedFailure) skipIf, skipUnless, expectedFailure, doModuleCleanups)
from .suite import BaseTestSuite, TestSuite from .suite import BaseTestSuite, TestSuite
from .loader import TestLoader, defaultTestLoader from .loader import TestLoader, defaultTestLoader
from .main import TestProgram, main from .main import TestProgram, main

View file

@ -0,0 +1 @@
Export :func:`unittest.doModuleCleanups` in :mod:`unittest`. Patch by Kumar Aditya.