[pypy-commit] pypy default: Skip this test if sys.setdefaultencoding() was already removed,
arigo
noreply at buildbot.pypy.org
Thu Mar 15 01:18:44 CET 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r53628:f24dbbb91cb4
Date: 2012-03-14 17:18 -0700
http://bitbucket.org/pypy/pypy/changeset/f24dbbb91cb4/
Log: Skip this test if sys.setdefaultencoding() was already removed, e.g.
when running with -A.
diff --git a/pypy/objspace/std/test/test_stringobject.py b/pypy/objspace/std/test/test_stringobject.py
--- a/pypy/objspace/std/test/test_stringobject.py
+++ b/pypy/objspace/std/test/test_stringobject.py
@@ -508,6 +508,8 @@
# Need default encoding utf-8, but sys.setdefaultencoding
# is removed after startup.
import sys
+ if not hasattr(sys, 'setdefaultencoding'):
+ skip("sys.setdefaultencoding() not available")
old_encoding = sys.getdefaultencoding()
# Duplicate unittest.test_support.CleanImport logic because it won't
# import.
More information about the pypy-commit
mailing list