8000 [3.11] gh-115341: Fix loading unit tests with doctests in -OO mode (G… · python/cpython@0bb94f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0bb94f4

Browse files
[3.11] gh-115341: Fix loading unit tests with doctests in -OO mode (GH-115342) (GH-115672)
(cherry picked from commit 872cc99) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 55b9633 commit 0bb94f4

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
@@ -2197,13 +2197,13 @@ def __init__(self, test, optionflags=0, setUp=None, tearDown=None,
21972197
unittest.TestCase.__init__(self)
21982198
self._dt_optionflags = optionflags
21992199
self._dt_checker = checker
2200-
self._dt_globs = test.globs.copy()
22012200
self._dt_test = test
22022201
self._dt_setUp = setUp
22032202
self._dt_tearDown = tearDown
22042203

22052204
def setUp(self):
22062205
test = self._dt_test
2206+
self._dt_globs = test.globs.copy()
22072207

22082208
if self._dt_setUp is not None:
22092209
self._dt_setUp(test)

0 commit comments

Comments
 (0)
0