Add helpers for testing unicode disabled builds.
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index e1ee3f5..695ac95 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -498,13 +498,18 @@
# for a discussion of this number).
SOCK_MAX_SIZE = 16 * 1024 * 1024 + 1
+is_jython = sys.platform.startswith('java')
+
try:
unicode
have_unicode = True
except NameError:
have_unicode = False
-is_jython = sys.platform.startswith('java')
+requires_unicode = unittest.skipUnless(have_unicode, 'no unicode support')
+
+def u(s):
+ return unicode(s, 'unicode-escape')
# FS_NONASCII: non-ASCII Unicode character encodable by
# sys.getfilesystemencoding(), or None if there is no such character.