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

Skip to content

Commit dfeb76b

Browse files
serhiy-storchakamiss-islington
authored andcommitted
pythongh-115341: Fix loading unit tests with doctests in -OO mode (pythonGH-115342)
(cherry picked from commit 872cc99) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 323f635 commit dfeb76b

File tree

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
@@ -2203,13 +2203,13 @@ def __init__(self, test, optionflags=0, setUp=None, tearDown=None,
22032203
unittest.TestCase.__init__(self)
22042204
self._dt_optionflags = optionflags
22052205
self._dt_checker = checker
2206-
self._dt_globs = test.globs.copy()
22072206
self._dt_test = test
22082207
self._dt_setUp = setUp
22092208
self._dt_tearDown = tearDown
22102209

22112210
def setUp(self):
22122211
test = self._dt_test
2212+
self._dt_globs = test.globs.copy()
22132213

22142214
if self._dt_setUp is not None:
22152215
self._dt_setUp(test)

0 commit comments

Comments
 (0)
0