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

Method test_include_on_stdin

Lib/test/test_compileall.py:819–830  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

817 self.assertNotCompiled(f4)
818
819 def test_include_on_stdin(self):
820 f1 = script_helper.make_script(self.pkgdir, 'f1', '')
821 f2 = script_helper.make_script(self.pkgdir, 'f2', '')
822 f3 = script_helper.make_script(self.pkgdir, 'f3', '')
823 f4 = script_helper.make_script(self.pkgdir, 'f4', '')
824 p = script_helper.spawn_python(*(self._get_run_args(()) + ['-i', '-']))
825 p.stdin.write((f3+os.linesep).encode('ascii'))
826 script_helper.kill_python(p)
827 self.assertNotCompiled(f1)
828 self.assertNotCompiled(f2)
829 self.assertCompiled(f3)
830 self.assertNotCompiled(f4)
831
832 def test_compiles_as_much_as_possible(self):
833 bingfn = script_helper.make_script(self.pkgdir, 'bing', 'syntax(error')

Callers

nothing calls this directly

Calls 6

_get_run_argsMethod · 0.95
assertNotCompiledMethod · 0.95
assertCompiledMethod · 0.95
make_scriptMethod · 0.45
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected