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

Method test_run_code

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

Source from the content-addressed store, hash-verified

155 """Unit tests for runpy._run_code and runpy._run_module_code"""
156
157 def test_run_code(self):
158 expected_ns = example_namespace.copy()
159 expected_ns.update({
160 "__loader__": None,
161 })
162 def create_ns(init_globals):
163 return _run_code(example_source, {}, init_globals)
164 self.check_code_execution(create_ns, expected_ns)
165
166 def test_run_module_code(self):
167 mod_name = "<Nonsense>"

Callers

nothing calls this directly

Calls 3

check_code_executionMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected