Author: Armin Rigo <ar...@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. _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit