Issues #10017 and #14998: Fix TypeError using pprint on dictionaries with unorderable key.
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index 4e53cd8..7daf4a7 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -462,6 +462,15 @@
         self.assertEqual(clean(pprint.pformat(dict.fromkeys(keys))),
             '{' + ','.join('%r:None' % k for k in skeys) + '}')
 
+        # Issue 10017: TypeError on user-defined types as dict keys.
+        self.assertEqual(pprint.pformat({Unorderable: 0, 1: 0}),
+                         '{1: 0, ' + repr(Unorderable) +': 0}')
+
+        # Issue 14998: TypeError on tuples with NoneTypes as dict keys.
+        self.assertEqual(pprint.pformat({(1,): 0, (None,): 0}),
+                         '{(1,): 0, (None,): 0}')
+
+
 class DottedPrettyPrinter(pprint.PrettyPrinter):
 
     def format(self, object, context, maxlevels, level):