Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13)

Unified Diff: Lib/test/test_importlib/test_api.py

Issue 19413: Reload semantics changed unexpectedly in Python 3.3
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/importlib/__init__.py ('k') | Python/importlib.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_importlib/test_api.py
+++ b/Lib/test/test_importlib/test_api.py
@@ -190,6 +190,16 @@
self.assertEqual(actual.spam, 3)
self.assertEqual(reloaded.spam, 3)
+ def test_reload_missing_loader(self):
+ with support.CleanImport('types'):
+ import types
+ del types.__loader__
+ reloaded = self.init.reload(types)
+
+ self.assertIs(reloaded, types)
+ self.assertIs(sys.modules['types'], types)
+
+
class Frozen_ReloadTests(ReloadTests, unittest.TestCase):
init = frozen_init
« no previous file with comments | « Lib/importlib/__init__.py ('k') | Python/importlib.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+