[Python-3000-checkins] r63705 - in python/branches/py3k: Doc/library/test.rst Lib/test/README Lib/test/support.py Lib/test/test_float.py

benjamin.peterson python-3000-checkins at python.org
Mon May 26 19:44:34 CEST 2008


Author: benjamin.peterson
Date: Mon May 26 19:44:33 2008
New Revision: 63705

Log:
remove test.support.have_unicode


Modified:
   python/branches/py3k/Doc/library/test.rst
   python/branches/py3k/Lib/test/README
   python/branches/py3k/Lib/test/support.py
   python/branches/py3k/Lib/test/test_float.py

Modified: python/branches/py3k/Doc/library/test.rst
==============================================================================
--- python/branches/py3k/Doc/library/test.rst	(original)
+++ python/branches/py3k/Doc/library/test.rst	Mon May 26 19:44:33 2008
@@ -221,11 +221,6 @@
    :mod:`test.regrtest`.
 
 
-.. data:: have_unicode
-
-   :const:`True` when Unicode support is available.
-
-
 .. data:: is_jython
 
    :const:`True` if the running interpreter is Jython.

Modified: python/branches/py3k/Lib/test/README
==============================================================================
--- python/branches/py3k/Lib/test/README	(original)
+++ python/branches/py3k/Lib/test/README	Mon May 26 19:44:33 2008
@@ -355,8 +355,6 @@
       mode, and it raises ``TestFailed`` on failure instead of
       ``AssertionError``.
 
-    * ``have_unicode`` - true if Unicode is available, false otherwise.
-
     * ``is_jython`` - true if the interpreter is Jython, false otherwise.
 
     * ``TESTFN`` - a string that should always be used as the filename when

Modified: python/branches/py3k/Lib/test/support.py
==============================================================================
--- python/branches/py3k/Lib/test/support.py	(original)
+++ python/branches/py3k/Lib/test/support.py	Mon May 26 19:44:33 2008
@@ -17,14 +17,14 @@
            "verbose", "use_resources", "max_memuse", "record_original_stdout",
            "get_original_stdout", "unload", "unlink", "rmtree", "forget",
            "is_resource_enabled", "requires", "find_unused_port", "bind_port",
-           "fcmp", "have_unicode", "is_jython", "TESTFN", "HOST", "FUZZ",
-           "findfile", "verify", "vereq", "sortdict", "check_syntax_error",
-           "open_urlresource", "WarningMessage", "catch_warning", "CleanImport",
-           "EnvironmentVarGuard", "TransientResource", "captured_output",
-           "captured_stdout", "TransientResource", "transient_internet",
-           "run_with_locale", "set_memlimit", "bigmemtest", "bigaddrspacetest",
-           "BasicTestRunner", "run_unittest", "run_doctest", "threading_setup",
-           "threading_cleanup", "reap_children"]
+           "fcmp", "is_jython", "TESTFN", "HOST", "FUZZ", "findfile", "verify",
+           "vereq", "sortdict", "check_syntax_error", "open_urlresource",
+           "WarningMessage", "catch_warning", "CleanImport", "EnvironmentVarGuard",
+           "TransientResource", "captured_output", "captured_stdout",
+           "TransientResource", "transient_internet", "run_with_locale",
+           "set_memlimit", "bigmemtest", "bigaddrspacetest", "BasicTestRunner",
+           "run_unittest", "run_doctest", "threading_setup", "threading_cleanup",
+           "reap_children"]
 
 class Error(Exception):
     """Base class for regression test exceptions."""
@@ -243,12 +243,6 @@
         return (len(x) > len(y)) - (len(x) < len(y))
     return (x > y) - (x < y)
 
-try:
-    str
-    have_unicode = True
-except NameError:
-    have_unicode = False
-
 is_jython = sys.platform.startswith('java')
 
 # Filename used for testing

Modified: python/branches/py3k/Lib/test/test_float.py
==============================================================================
--- python/branches/py3k/Lib/test/test_float.py	(original)
+++ python/branches/py3k/Lib/test/test_float.py	Mon May 26 19:44:33 2008
@@ -22,11 +22,10 @@
         self.assertRaises(ValueError, float, "+-3.14")
         self.assertRaises(ValueError, float, "-+3.14")
         self.assertRaises(ValueError, float, "--3.14")
-        if have_unicode:
-            self.assertEqual(float(unicode("  3.14  ")), 3.14)
-            self.assertEqual(float(unicode("  \u0663.\u0661\u0664  ",'raw-unicode-escape')), 3.14)
-            # Implementation limitation in PyFloat_FromString()
-            self.assertRaises(ValueError, float, unicode("1"*10000))
+        self.assertEqual(float(unicode("  3.14  ")), 3.14)
+        self.assertEqual(float(unicode("  \u0663.\u0661\u0664  ",'raw-unicode-escape')), 3.14)
+        # Implementation limitation in PyFloat_FromString()
+        self.assertRaises(ValueError, float, unicode("1"*10000))
 
     @support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
     def test_float_with_comma(self):


More information about the Python-3000-checkins mailing list