Commits

Armin Rigo committed 4dce95a

Add a simpler test (missing so far) that shows what I did to be wrong.

Comments (0)

Files changed (1)

pypy/module/imp/test/test_import.py

         assert sys.path is oldpath
         assert 'setdefaultencoding' in dir(sys)
 
+    def test_reimport_builtin_simple_case(self):
+        import sys, time
+        time.foo = "bar"
+        del sys.modules['time']
+        import time
+        assert not hasattr(time, 'foo')
+
     def test_reimport_builtin(self):
         import sys, time
         oldpath = sys.path