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

Method test_freeze_simple_script

Lib/test/test_tools/test_freeze.py:27–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25
26 @support.requires_resource('cpu') # Building Python is slow
27 def test_freeze_simple_script(self):
28 script = textwrap.dedent("""
29 import sys
30 print('running...')
31 sys.exit(0)
32 """)
33 with os_helper.temp_dir() as outdir:
34 outdir, scriptfile, python = helper.prepare(script, outdir)
35 executable = helper.freeze(python, scriptfile, outdir)
36 text = helper.run(executable)
37 self.assertEqual(text, 'running...')

Callers

nothing calls this directly

Calls 6

temp_dirMethod · 0.80
freezeMethod · 0.80
dedentMethod · 0.45
prepareMethod · 0.45
runMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected