(self)
| 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...') |