Remove everything up until `class Foo(object):` in pdb tests

PyPy3 displays prompt two times on the line where `s` is present.
This commit is contained in:
ZyX 2015-02-01 12:13:56 +03:00
parent c3e541d16a
commit f4e3c3099f
3 changed files with 5 additions and 12 deletions

View File

@ -1,5 +1,3 @@
 1  pdb-script.py:2 <module>  s
-> class Foo(object):
 1  pdb-script.py:6 <module>  
--Call--
-> class Foo(object):

View File

@ -1,9 +1,3 @@
--Call--
-> def nop(_):
 2  <string>:1 <module>  pdb-script.py:2 <module>  
-> def nop(_):
 2  <string>:1 <module>  pdb-script.py:2 <module>  
-> class Foo(object):
 2  <string>:1 <module>  pdb-script.py:6 <module>  
--Call--
-> class Foo(object):

View File

@ -38,10 +38,11 @@ with codecs.open(fname, 'r', encoding='utf-8') as R:
for line in (R if shell != 'fish' else R.read().split('\n')):
i += 1
if not found_cd:
if shell == 'pdb':
found_cd = (i > 1)
else:
found_cd = ('cd tests/shell/3rd' in line)
found_cd = (
'class Foo(object):' in line
if shell == 'pdb' else
'cd tests/shell/3rd' in line
)
continue
if 'true is the last line' in line:
break