added "getcode" and "getname" methods to the ucnhash module (they're
probably more useful for the test code than for any applications, but
one never knows...)
diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py
index a33d111..a51dc9a 100644
--- a/Lib/test/test_ucn.py
+++ b/Lib/test/test_ucn.py
@@ -37,6 +37,23 @@
     u"\N{LATIN SMALL LETTER P}" \
     u"\N{FULL STOP}"
 verify(s == u"The rEd fOx ate the sheep.", s)
+
+import ucnhash
+
+# minimal sanity check
+for char in "SPAM":
+    name = "LATIN SMALL LETTER %s" % char
+    code = ucnhash.getcode(name)
+    verify(ucnhash.getname(code) == name)
+
+# loop over all characters in the database
+for code in range(65536):
+    try:
+        name = ucnhash.getname(code)
+        verify(ucnhash.getcode(name) == code)
+    except ValueError:
+        pass
+
 print "done."
 
 # misc. symbol testing