Armin Rigo committed ece1099

Kill even the "easy fix", add a test (thanks amaury)

Comments (0)

Files changed (2)


             # the module was already imported.  Refresh its content with
             # the saved dict, as done with built-in and extension modules
             # on CPython.
-            space.call_method(self.w_dict, 'clear')
             space.call_method(self.w_dict, 'update', self.w_initialdict)
         for w_submodule in self.submodules_w:


         assert sys.path is oldpath
         assert 'setdefaultencoding' in dir(sys)
+    def test_reload_builtin_doesnt_clear(self):
+        import sys
+        sys.foobar = "baz"
+        reload(sys)
+        assert sys.foobar == "baz"
     def test_reimport_builtin_simple_case_1(self):
         import sys, time
         del time.tzset
         assert hasattr(time, 'tzset')
     def test_reimport_builtin_simple_case_2(self):
+        skip("fix me")
         import sys, time = "bar"
         del sys.modules['time']
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.