summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2016-07-27 21:39:31 +0000
committerptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2016-07-27 21:39:31 +0000
commitf88253a853b7fc86bd05b9bf4ffe153baab7bb9f (patch)
tree61f28e447b8b2e04bda486f9e1e8192fda7972a4
parent2375582c860eb09aaf57faa81c5dadc72f2068c8 (diff)
downloadpyparsing-f88253a853b7fc86bd05b9bf4ffe153baab7bb9f.tar.gz
Tweak unicode ranges for Jython 2.7.0 compatibility
git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@379 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
-rw-r--r--src/unitTests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/unitTests.py b/src/unitTests.py
index 38ab445..c867e6e 100644
--- a/src/unitTests.py
+++ b/src/unitTests.py
@@ -1450,8 +1450,12 @@ class UpcaseDowncaseUnicode(ParseTestCase):
from __builtin__ import unichr
a = '\u00bfC\u00f3mo esta usted?'
- ualphas = "".join( unichr(i) for i in range(sys.maxunicode)
- if unichr(i).isalpha() )
+ if not JYTHON_ENV:
+ ualphas = "".join( unichr(i) for i in range(sys.maxunicode)
+ if unichr(i).isalpha() )
+ else:
+ ualphas = "".join( unichr(i) for i in itertools.chain(range(0xd800), range(0xe00,sys.maxunicode))
+ if unichr(i).isalpha() )
uword = pp.Word(ualphas).setParseAction(pp.upcaseTokens)
print_ = lambda *args: None