(self)
| 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>" |
nothing calls this directly
no test coverage detected