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

Method test_frozen

Lib/test/test_frozen.py:20–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18
19class TestFrozen(unittest.TestCase):
20 def test_frozen(self):
21 name = '__hello__'
22 if name in sys.modules:
23 del sys.modules[name]
24 with import_helper.frozen_modules():
25 import __hello__
26 with captured_stdout() as out:
27 __hello__.main()
28 self.assertEqual(out.getvalue(), 'Hello world!\n')
29
30 def test_frozen_submodule_in_unfrozen_package(self):
31 with import_helper.CleanImport('__phello__', '__phello__.spam'):

Callers

nothing calls this directly

Calls 4

captured_stdoutFunction · 0.90
mainMethod · 0.45
assertEqualMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected