Show More
@@ -218,6 +218,7 b' class DocTestCase(doctests.DocTestCase):' | |||
|
218 | 218 | self._dt_optionflags = optionflags |
|
219 | 219 | self._dt_checker = checker |
|
220 | 220 | self._dt_test = test |
|
221 | self._dt_test_globs_ori = test.globs | |
|
221 | 222 | self._dt_setUp = setUp |
|
222 | 223 | self._dt_tearDown = tearDown |
|
223 | 224 | |
@@ -276,6 +277,12 b' class DocTestCase(doctests.DocTestCase):' | |||
|
276 | 277 | super(DocTestCase, self).setUp() |
|
277 | 278 | |
|
278 | 279 | def tearDown(self): |
|
280 | ||
|
281 | # Undo the test.globs reassignment we made, so that the parent class | |
|
282 | # teardown doesn't destroy the ipython namespace | |
|
283 | if isinstance(self._dt_test.examples[0],IPExample): | |
|
284 | self._dt_test.globs = self._dt_test_globs_ori | |
|
285 | ||
|
279 | 286 | # XXX - fperez: I am not sure if this is truly a bug in nose 0.11, but |
|
280 | 287 | # it does look like one to me: its tearDown method tries to run |
|
281 | 288 | # |
General Comments 0
You need to be logged in to leave comments.
Login now