cpython: 96cb47f8142e (original) (raw)

Mercurial > cpython

changeset 76676:96cb47f8142e 3.2

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:07:49 +0800
parents 5c801899cd6d
children ab63e874265e eab5120cc208
files Lib/bdb.py Lib/test/test_pdb.py Misc/NEWS
diffstat 3 files changed, 68 insertions(+), 1 deletions(-)[+] [-] Lib/bdb.py 15 Lib/test/test_pdb.py 51 Misc/NEWS 3

line wrap: on

line diff

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

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

@@ -186,6 +191,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 @@ -5,6 +5,7 @@ import pdb import sys import unittest import subprocess +import textwrap from test import support

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

@@ -595,6 +596,22 @@ def test_pdb_run_with_code_object(): class PdbTestCase(unittest.TestCase):

+ def test_issue7964(self): # open the file as binary so we can force \r\n newline with open(support.TESTFN, 'wb') as f: @@ -610,6 +627,40 @@ class PdbTestCase(unittest.TestCase): self.assertNotIn(b'SyntaxError', stdout, "Got a syntax error running test script under PDB")

+

+

+

+

+ def tearDown(self): support.unlink(support.TESTFN)

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