Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index c74db0f..a89ed52 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -1,4 +1,4 @@
-from test_support import verbose
+from test_support import verbose, have_unicode
 import sys
 
 # test string formatting operator (I am not sure if this is being tested
@@ -34,7 +34,8 @@
 
 def testboth(formatstr, *args):
     testformat(formatstr, *args)
-    testformat(unicode(formatstr), *args)
+    if have_unicode:
+        testformat(unicode(formatstr), *args)
 
 
 testboth("%.1d", (1,), "1")
@@ -212,5 +213,6 @@
 
 test_exc('abc %a', 1, ValueError,
          "unsupported format character 'a' (0x61) at index 5")
-test_exc(u'abc %\u3000', 1, ValueError,
-         "unsupported format character '?' (0x3000) at index 5")
+if have_unicode:
+    test_exc(unicode('abc %\u3000'), 1, ValueError,
+             "unsupported format character '?' (0x3000) at index 5")