summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-01-19 09:45:02 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2001-01-19 09:45:02 (GMT)
commit0fdb90cafe596a03a5c3005a21e8fa2a230803e5 (patch)
treeb336a6167a1df4af3cf4ed184d68f7842dd19807 /Lib/test
parenta2bf2709b39b7848e4f887bc60289b64e2562f36 (diff)
downloadcpython-0fdb90cafe596a03a5c3005a21e8fa2a230803e5.zip
cpython-0fdb90cafe596a03a5c3005a21e8fa2a230803e5.tar.gz
cpython-0fdb90cafe596a03a5c3005a21e8fa2a230803e5.tar.bz2
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')
-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 92155be..a33d111 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')