MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_main_recursion_error

Method test_main_recursion_error

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

Source from the content-addressed store, hash-verified

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