8000 gh-115341: Fix loading unit tests with doctests in -OO mode (GH-115342) · miss-islington/cpython@872cc99 · GitHub
[go: up one dir, main page]

Skip to content

Commit 872cc99

Browse files
pythongh-115341: Fix loading unit tests with doctests in -OO mode (pythonGH-115342)
1 parent 07ef9d8 commit 872cc99

File tree

E821

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/doctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,13 +2225,13 @@ def __init__(self, test, optionflags=0, setUp=None, tearDown=None,
22252225
unittest.TestCase.__init__(self)
22262226
self._dt_optionflags = optionflags
22272227
self._dt_checker = checker
2228-
self._dt_globs = test.globs.copy()
22292228
self._dt_test = test
22302229
self._dt_setUp = setUp
22312230
self._dt_tearDown = tearDown
22322231

22332232
def setUp(self):
22342233
test = self._dt_test
2234+
self._dt_globs = test.globs.copy()
22352235

22362236
if self._dt_setUp is not None:
22372237
self._dt_setUp(test)

0 commit comments

Comments
 (0)
0