Author: Matti Picus <[email protected]>
Branch: py3.6
Changeset: r97834:90a079f62b2b
Date: 2019-10-22 12:21 +0300
http://bitbucket.org/pypy/pypy/changeset/90a079f62b2b/
Log: fix failing 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
@@ -644,7 +644,7 @@
import infinite_reload
def test_reload_module_subclass(self):
- import types
+ import types, imp
#MyModType = types.ModuleType
class MyModType(types.ModuleType):
@@ -654,7 +654,7 @@
with raises(ImportError):
# Fails because the module is not in sys.modules, but *not* because
# it's a subtype of ModuleType.
- reload(m)
+ imp.reload(m)
def test_explicitly_missing(self):
diff --git a/pypy/module/sys/test/test_sysmodule.py
b/pypy/module/sys/test/test_sysmodule.py
--- a/pypy/module/sys/test/test_sysmodule.py
+++ b/pypy/module/sys/test/test_sysmodule.py
@@ -156,7 +156,14 @@
def test_getfilesystemencoding(self):
import sys
- assert sys.getfilesystemencoding() == self.filesystemenc
+ enc = sys.getfilesystemencoding()
+ if self.appdirect:
+ assert enc == self.filesystemenc
+ else:
+ # see comment in 'setup_after_space_initialization'
+ untranslated_enc = {'win32': 'mbcs', 'darwin': 'utf-8'}.get(enc,
'ascii')
+ assert enc == untranslated_enc
+
def test_float_info(self):
import sys
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit