"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Lib/test/test_pdb.py" between
Python-3.9.3.tar.xz and Python-3.9.4.tar.xz

About: Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Newest major release.

test_pdb.py  (Python-3.9.3.tar.xz):test_pdb.py  (Python-3.9.4.tar.xz)
skipping to change at line 1433 skipping to change at line 1433
# A syntax error in the debuggee. # A syntax error in the debuggee.
script = "def f: pass\n" script = "def f: pass\n"
commands = '' commands = ''
expected = "SyntaxError:" expected = "SyntaxError:"
stdout, stderr = self.run_pdb_script(script, commands) stdout, stderr = self.run_pdb_script(script, commands)
self.assertIn(expected, stdout, self.assertIn(expected, stdout,
'\n\nExpected:\n{}\nGot:\n{}\n' '\n\nExpected:\n{}\nGot:\n{}\n'
'Fail to handle a syntax error in the debuggee.' 'Fail to handle a syntax error in the debuggee.'
.format(expected, stdout)) .format(expected, stdout))
def test_issue26053(self):
# run command of pdb prompt echoes the correct args
script = "print('hello')"
commands = """
run a b c
run d e f
stdout, stderr = self.run_pdb_script(script, commands)
res = '\n'.join([x.strip() for x in stdout.splitlines()])
self.assertRegex(res, "Restarting .* with arguments:\na b c")
self.assertRegex(res, "Restarting .* with arguments:\nd e f")
def test_readrc_kwarg(self): def test_readrc_kwarg(self):
script = textwrap.dedent(""" script = textwrap.dedent("""
import pdb; pdb.Pdb(readrc=False).set_trace() import pdb; pdb.Pdb(readrc=False).set_trace()
print('hello') print('hello')
""") """)
save_home = os.environ.pop('HOME', None) save_home = os.environ.pop('HOME', None)
try: try:
with support.temp_cwd(): with support.temp_cwd():
 End of changes. 1 change blocks. 
0 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)