Bug #1704793: Raise KeyError if unicodedata.lookup cannot
represent the result in a single character.
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 0023bf4..92353f1 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -6,7 +6,7 @@
 
 """#"
 import unittest, test.test_support
-import hashlib
+import hashlib, sys
 
 encoding = 'utf-8'
 
@@ -214,6 +214,10 @@
                 count += 1
         self.assert_(count >= 10) # should have tested at least the ASCII digits
 
+    def test_bug_1704793(self):
+        if sys.maxunicode == 65535:
+            self.assertRaises(KeyError, self.db.lookup, "GOTHIC LETTER FAIHU")
+
 def test_main():
     test.test_support.run_unittest(
         UnicodeMiscTest,