##// END OF EJS Templates
Merge pull request #2717 from bfroehle/ipdb_short_function...
Bradley M. Froehle -
r8930:1f242430 merge
parent child Browse files
Show More
@@ -352,8 +352,8 b' class Pdb(OldPdb):'
352
352
353 start = lineno - 1 - context//2
353 start = lineno - 1 - context//2
354 lines = ulinecache.getlines(filename)
354 lines = ulinecache.getlines(filename)
355 start = max(start, 0)
356 start = min(start, len(lines) - context)
355 start = min(start, len(lines) - context)
356 start = max(start, 0)
357 lines = lines[start : start + context]
357 lines = lines[start : start + context]
358
358
359 for i,line in enumerate(lines):
359 for i,line in enumerate(lines):
@@ -121,3 +121,22 b' def test_ipdb_magics():'
121 Constructor Docstring:Docstring for ExampleClass.__init__
121 Constructor Docstring:Docstring for ExampleClass.__init__
122 ipdb> continue
122 ipdb> continue
123 '''
123 '''
124
125 def test_ipdb_magics():
126 '''Test ipdb with a very short function.
127
128 >>> def bar():
129 ... pass
130
131 Run ipdb.
132
133 >>> with PdbTestInput([
134 ... 'continue',
135 ... ]):
136 ... debugger.Pdb().runcall(bar)
137 > <doctest ...>(2)bar()
138 1 def bar():
139 ----> 2 pass
140 <BLANKLINE>
141 ipdb> continue
142 '''
General Comments 0
You need to be logged in to leave comments. Login now