(self)
| 4774 | self.assertEqual(db.checkline(os_helper.TESTFN, 1), 1) |
| 4775 | |
| 4776 | def test_checkline_is_not_executable(self): |
| 4777 | # Test for comments, docstrings and empty lines |
| 4778 | s = textwrap.dedent(""" |
| 4779 | # Comment |
| 4780 | \"\"\" docstring \"\"\" |
| 4781 | ''' docstring ''' |
| 4782 | |
| 4783 | """) |
| 4784 | with open(os_helper.TESTFN, "w") as f: |
| 4785 | f.write(s) |
| 4786 | num_lines = len(s.splitlines()) + 2 # Test for EOF |
| 4787 | with redirect_stdout(StringIO()): |
| 4788 | db = pdb.Pdb() |
| 4789 | for lineno in range(num_lines): |
| 4790 | self.assertFalse(db.checkline(os_helper.TESTFN, lineno)) |
| 4791 | |
| 4792 | |
| 4793 | @support.requires_subprocess() |
nothing calls this directly
no test coverage detected