summaryrefslogtreecommitdiff
path: root/Lib/test/test_ucn.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-01-19 09:45:02 +0000
committerFredrik Lundh <fredrik@pythonware.com>2001-01-19 09:45:02 +0000
commit19b0196fc99ad266534fb8ff614a7e8f01eee31e (patch)
treeb2d116d1583a6299a2b14d3454fbf0f182bca74d /Lib/test/test_ucn.py
parent8488849b1f17d3cdc647ca3229ac1b6c4f85825a (diff)
downloadcpython-19b0196fc99ad266534fb8ff614a7e8f01eee31e.tar.gz
refactored the unicodeobject/ucnhash interface, to hide the
implementation details inside the ucnhash module. also cleaned up the unicode copyright blurb a little; Secret Labs' internal revision history isn't that interesting...
Diffstat (limited to 'Lib/test/test_ucn.py')
-rw-r--r--Lib/test/test_ucn.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py
index 92155be869..a33d1114c6 100644
--- a/Lib/test/test_ucn.py
+++ b/Lib/test/test_ucn.py
@@ -50,22 +50,20 @@ print "done."
# strict error testing:
print "Testing unicode character name expansion strict error handling....",
-k_cchMaxUnicodeName = 83
-
-s = "\N{" + "1" * (k_cchMaxUnicodeName + 2) + "}"
try:
- unicode(s, 'unicode-escape', 'strict')
+ unicode("\N{blah}", 'unicode-escape', 'strict')
except UnicodeError:
pass
else:
- raise AssertionError, "failed to raise an exception when presented " \
- "with a UCN > k_cchMaxUnicodeName"
+ raise AssertionError, "failed to raise an exception when given a bogus character name"
+
try:
- unicode("\N{blah}", 'unicode-escape', 'strict')
+ unicode("\N{" + "x" * 100000 + "}", 'unicode-escape', 'strict')
except UnicodeError:
pass
else:
- raise AssertionError, "failed to raise an exception when given a bogus character name"
+ raise AssertionError, "failed to raise an exception when given a very " \
+ "long bogus character name"
try:
unicode("\N{SPACE", 'unicode-escape', 'strict')