(self)
| 3915 | .format(expected, stderr)) |
| 3916 | |
| 3917 | def test_issue84583(self): |
| 3918 | # A syntax error from ast.literal_eval should not make pdb exit. |
| 3919 | script = "import ast; ast.literal_eval('')\n" |
| 3920 | commands = """ |
| 3921 | continue |
| 3922 | where |
| 3923 | quit |
| 3924 | """ |
| 3925 | stdout, stderr = self.run_pdb_script(script, commands) |
| 3926 | # The code should appear 3 times in the stdout/stderr: |
| 3927 | # 1. when pdb starts (stdout) |
| 3928 | # 2. when the exception is raised, in trackback (stderr) |
| 3929 | # 3. in where command (stdout) |
| 3930 | self.assertEqual(stdout.count("ast.literal_eval('')"), 2) |
| 3931 | self.assertEqual(stderr.count("ast.literal_eval('')"), 1) |
| 3932 | |
| 3933 | def test_issue26053(self): |
| 3934 | # run command of pdb prompt echoes the correct args |
nothing calls this directly
no test coverage detected