diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-16 20:50:37 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-16 20:50:37 (GMT) |
commit | fdfe9fce8ca667bba06b1b1a657f722fd9511562 (patch) | |
tree | 7cfd10a678673c6ef22d36ba68001b724715c7bf /Lib | |
parent | 2d011e6c2c022c89a63bf0ec454a93fbff6b49b4 (diff) | |
download | cpython-fdfe9fce8ca667bba06b1b1a657f722fd9511562.zip cpython-fdfe9fce8ca667bba06b1b1a657f722fd9511562.tar.gz cpython-fdfe9fce8ca667bba06b1b1a657f722fd9511562.tar.bz2 |
Add helpers for testing unicode disabled builds.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_support.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ PIPE_MAX_SIZE = 4 * 1024 * 1024 + 1 # 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. |