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