Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r92813:21d9bc2c1120
Date: 2017-10-21 17:56 +0100
http://bitbucket.org/pypy/pypy/changeset/21d9bc2c1120/
Log: Fix untranslated test_reimport_builtin(): time.tzname is initialised
in a non-standard way that seems to break in untranslated tests
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
@@ -637,18 +637,18 @@
def test_reimport_builtin(self):
import imp, sys, time
- oldpath = sys.path
- time.tzname = "<test_reimport_builtin removed this>"
+ old_sleep = time.sleep
+ time.sleep = "<test_reimport_builtin removed this>"
del sys.modules['time']
import time as time1
assert sys.modules['time'] is time1
- assert time.tzname == "<test_reimport_builtin removed this>"
+ assert time.sleep == "<test_reimport_builtin removed this>"
- imp.reload(time1) # don't leave a broken time.tzname behind
+ imp.reload(time1) # don't leave a broken time.sleep behind
import time
- assert time.tzname != "<test_reimport_builtin removed this>"
+ assert time.sleep is old_sleep
def test_reload_infinite(self):
import infinite_reload
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit