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

Method test_main_recursion_error

Lib/test/test_runpy.py:746–754  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

744 @no_tracing
745 @requires_resource('cpu')
746 def test_main_recursion_error(self):
747 with temp_dir() as script_dir, temp_dir() as dummy_dir:
748 mod_name = '__main__'
749 source = ("import runpy\n"
750 "runpy.run_path(%r)\n") % dummy_dir
751 script_name = self._make_test_script(script_dir, mod_name, source)
752 zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
753 with infinite_recursion(25):
754 self.assertRaises(RecursionError, run_path, zip_name)
755
756 def test_encoding(self):
757 with temp_dir() as script_dir:

Callers

nothing calls this directly

Calls 5

_make_test_scriptMethod · 0.95
temp_dirFunction · 0.90
make_zip_scriptFunction · 0.90
infinite_recursionFunction · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected