Ticket #6024: doctest_patch_for_coverage_py.diff
File doctest_patch_for_coverage_py.diff, 816 bytes (added by , 17 years ago) |
---|
-
django/test/_doctest.py
346 346 """ 347 347 def __init__(self, out): 348 348 self.__out = out 349 self.__debugger_used = False 349 350 pdb.Pdb.__init__(self) 350 351 352 def set_trace(self): 353 self.__debugger_used = True 354 pdb.Pdb.set_trace(self) 355 356 def set_continue(self): 357 # Calling set_continue unconditionally would break unit test coverage 358 # reporting, as Bdb.set_continue calls sys.settrace(None). 359 if self.__debugger_used: 360 pdb.Pdb.set_continue(self) 361 362 351 363 def trace_dispatch(self, *args): 352 364 # Redirect stdout to the given stream. 353 365 save_stdout = sys.stdout