cpython: 2644e4ea02d3 (original) (raw)
Mercurial > cpython
changeset 76783:2644e4ea02d3 2.7
#13183: backport fixes to test_pdb to 2.7 branch [#13183]
Georg Brandl georg@python.org | |
---|---|
date | Sun, 06 May 2012 11:53:51 +0200 |
parents | 35ef949e85d7 |
children | 48385618525b |
files | Lib/test/test_pdb.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-)[+] [-] Lib/test/test_pdb.py 7 |
line wrap: on
line diff
--- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -20,6 +20,7 @@ class PdbTestCase(unittest.TestCase): filename = 'main.py' with open(filename, 'w') as f: f.write(textwrap.dedent(script))
self.addCleanup(test_support.unlink, filename)[](#l1.7) cmd = [sys.executable, '-m', 'pdb', filename][](#l1.8) stdout = stderr = None[](#l1.9) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,[](#l1.10)
@@ -61,9 +62,11 @@ class PdbTestCase(unittest.TestCase): """ with open('bar.py', 'w') as f: f.write(textwrap.dedent(bar))
self.addCleanup(test_support.unlink, 'bar.py')[](#l1.15) stdout, stderr = self.run_pdb(script, commands)[](#l1.16)
self.assertIn('main.py(5)foo()->None', stdout.split('\n')[-3],[](#l1.17)
'Fail to step into the caller after a return')[](#l1.18)
self.assertTrue([](#l1.19)
any('main.py(5)foo()->None' in l for l in stdout.splitlines()),[](#l1.20)
'Fail to step into the caller after a return')[](#l1.21)