[pypy-commit] pypy default: Kill even the "easy fix", add a test (thanks amaury)
arigo
noreply at buildbot.pypy.org
Tue Jun 11 13:57:23 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r64855:ece10991099e
Date: 2013-06-11 13:56 +0200
http://bitbucket.org/pypy/pypy/changeset/ece10991099e/
Log: Kill even the "easy fix", add a test (thanks amaury)
diff --git a/pypy/interpreter/mixedmodule.py b/pypy/interpreter/mixedmodule.py
--- a/pypy/interpreter/mixedmodule.py
+++ b/pypy/interpreter/mixedmodule.py
@@ -43,7 +43,6 @@
# 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:
diff --git a/pypy/module/imp/test/test_import.py b/pypy/module/imp/test/test_import.py
--- a/pypy/module/imp/test/test_import.py
+++ b/pypy/module/imp/test/test_import.py
@@ -565,6 +565,12 @@
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
@@ -573,6 +579,7 @@
assert hasattr(time, 'tzset')
def test_reimport_builtin_simple_case_2(self):
+ skip("fix me")
import sys, time
time.foo = "bar"
del sys.modules['time']
More information about the pypy-commit
mailing list