Skip to content

Commit cc40058

Browse files
bpo-46877: export unittest.doModuleCleanups in unittest package (#31613)
1 parent b356035 commit cc40058

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/unittest/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def testMultiply(self):
4949
'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless',
5050
'expectedFailure', 'TextTestResult', 'installHandler',
5151
'registerResult', 'removeResult', 'removeHandler',
52-
'addModuleCleanup']
52+
'addModuleCleanup', 'doModuleCleanups']
5353

5454
# Expose obsolete functions for backwards compatibility
5555
# bpo-5846: Deprecated in Python 3.11, scheduled for removal in Python 3.13.
@@ -59,7 +59,7 @@ def testMultiply(self):
5959

6060
from .result import TestResult
6161
from .case import (addModuleCleanup, TestCase, FunctionTestCase, SkipTest, skip,
62-
skipIf, skipUnless, expectedFailure)
62+
skipIf, skipUnless, expectedFailure, doModuleCleanups)
6363
from .suite import BaseTestSuite, TestSuite
6464
from .loader import TestLoader, defaultTestLoader
6565
from .main import TestProgram, main
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Export :func:`unittest.doModuleCleanups` in :mod:`unittest`. Patch by Kumar Aditya.

0 commit comments

Comments
 (0)