cpython: 5ea23739e9ba (original) (raw)

Mercurial > cpython

changeset 76677:5ea23739e9ba 2.7

issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye [#13183]

Senthil Kumaran senthil@uthcode.com
date Tue, 01 May 2012 10:36:28 +0800
parents 2468b58f7fce
children 4c3c4891fd6a
files Lib/bdb.py Lib/test/test_pdb.py Misc/NEWS
diffstat 3 files changed, 71 insertions(+), 1 deletions(-)[+] [-] Lib/bdb.py 11 Lib/test/test_pdb.py 58 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/bdb.py +++ b/Lib/bdb.py @@ -24,6 +24,7 @@ class Bdb: self.skip = set(skip) if skip else None self.breaks = {} self.fncache = {}

def canonic(self, filename): if filename == "<" + filename[1:-1] + ">": @@ -82,7 +83,9 @@ class Bdb: def dispatch_return(self, frame, arg): if self.stop_here(frame) or frame == self.returnframe:

@@ -186,6 +189,14 @@ class Bdb: def set_step(self): """Stop after one line of code."""

def set_next(self, frame):

--- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -6,12 +6,66 @@ import sys import os import unittest import subprocess +import textwrap from test import test_support

This little helper class is essential for testing pdb under doctest.

from test_doctest import _FakeInput +class PdbTestCase(unittest.TestCase): +

+

+

+

+

+

+ + class PdbTestInput(object): """Context manager that makes testing Pdb in doctests easier.""" @@ -309,7 +363,9 @@ class ModuleInitTester(unittest.TestCase def test_main(): from test import test_pdb test_support.run_doctest(test_pdb, verbosity=True)

if name == 'main': test_main()

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -56,6 +56,9 @@ Core and Builtins Library ------- +- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running