summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/test.rst5
-rw-r--r--Lib/test/README2
-rw-r--r--Lib/test/support.py22
-rw-r--r--Lib/test/test_float.py9
4 files changed, 12 insertions, 26 deletions
diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 4c0af39..fffcd87 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -221,11 +221,6 @@ The :mod:`test.test_support` module defines the following constants:
:mod:`test.regrtest`.
-.. data:: have_unicode
-
- :const:`True` when Unicode support is available.
-
-
.. data:: is_jython
:const:`True` if the running interpreter is Jython.
diff --git a/Lib/test/README b/Lib/test/README
index fdc847c..a237740 100644
--- a/Lib/test/README
+++ b/Lib/test/README
@@ -355,8 +355,6 @@ test_support provides the following useful objects:
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
diff --git a/Lib/test/support.py b/Lib/test/support.py
index deae47d..c011c10 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -17,14 +17,14 @@ __all__ = ["Error", "TestFailed", "TestSkipped", "ResourceDenied", "import_modul
"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 @@ def fcmp(x, y): # fuzzy comparison function
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
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
index d17400c..4078973 100644
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -22,11 +22,10 @@ class GeneralFloatCases(unittest.TestCase):
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):