MCPcopy Index your code
hub / github.com/python/cpython / test_stdin

Method test_stdin

Lib/test/test_symtable.py:660–672  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

658 self.assertIn(" symbol table for function 'spam':", lines)
659
660 def test_stdin(self):
661 with support.captured_stdin() as stdin:
662 stdin.write(TEST_CODE)
663 stdin.seek(0)
664 with support.captured_stdout() as stdout:
665 symtable.main([])
666 out = stdout.getvalue()
667 stdin.seek(0)
668 with support.captured_stdout() as stdout:
669 symtable.main(['-'])
670 self.assertEqual(stdout.getvalue(), out)
671 lines = out.splitlines()
672 self.assertIn("symbol table for module from file '<stdin>':", lines)
673
674
675if __name__ == '__main__':

Callers

nothing calls this directly

Calls 7

assertInMethod · 0.80
writeMethod · 0.45
seekMethod · 0.45
mainMethod · 0.45
getvalueMethod · 0.45
assertEqualMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected