(self)
| 581 | |
| 582 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 583 | def test_file(self): |
| 584 | filename = os_helper.TESTFN |
| 585 | self.addCleanup(os_helper.unlink, filename) |
| 586 | with open(filename, 'w') as f: |
| 587 | f.write(TEST_CODE) |
| 588 | with support.captured_stdout() as stdout: |
| 589 | symtable.main([filename]) |
| 590 | out = stdout.getvalue() |
| 591 | self.assertIn('\n\n', out) |
| 592 | self.assertNotIn('\n\n\n', out) |
| 593 | lines = out.splitlines() |
| 594 | self.assertIn(f"symbol table for module from file {filename!r}:", lines) |
| 595 | self.assertIn(" local symbol 'glob': def_local", lines) |
| 596 | self.assertIn(" global_implicit symbol 'glob': use", lines) |
| 597 | self.assertIn(" local symbol 'spam': def_local", lines) |
| 598 | self.assertIn(" symbol table for function 'spam':", lines) |
| 599 | |
| 600 | def test_stdin(self): |
| 601 | with support.captured_stdin() as stdin: |
nothing calls this directly
no test coverage detected