(self)
| 337 | self.assertIs(reloaded, ham) |
| 338 | |
| 339 | def test_module_missing_spec(self): |
| 340 | #Test that reload() throws ModuleNotFounderror when reloading |
| 341 | # a module whose missing a spec. (bpo-29851) |
| 342 | name = 'spam' |
| 343 | with test_util.uncache(name): |
| 344 | module = sys.modules[name] = types.ModuleType(name) |
| 345 | # Sanity check by attempting an import. |
| 346 | module = self.init.import_module(name) |
| 347 | self.assertIsNone(module.__spec__) |
| 348 | with self.assertRaises(ModuleNotFoundError): |
| 349 | self.init.reload(module) |
| 350 | |
| 351 | def test_reload_traceback_with_non_str(self): |
| 352 | # gh-125519 |
nothing calls this directly
no test coverage detected