diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-07-10 20:26:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 20:26:06 (GMT) |
commit | 4c8f09d7cef8c7aa07d5b5232b5b64f63819a743 (patch) | |
tree | 2d90e13b6dc939f019a6cafc45ea604cbb90f584 /Lib/test/test_decimal.py | |
parent | 9650fe0197779b4dfded94be111e39c5810f098f (diff) | |
download | cpython-4c8f09d7cef8c7aa07d5b5232b5b64f63819a743.zip cpython-4c8f09d7cef8c7aa07d5b5232b5b64f63819a743.tar.gz cpython-4c8f09d7cef8c7aa07d5b5232b5b64f63819a743.tar.bz2 |
bpo-36346: Make using the legacy Unicode C API optional (GH-21437)
Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0
makes the interpreter not using the wchar_t cache and the legacy Unicode C API.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r-- | Lib/test/test_decimal.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py index 716e6eb..9dbae44 100644 --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -33,7 +33,8 @@ import unittest import numbers import locale from test.support import (run_unittest, run_doctest, is_resource_enabled, - requires_IEEE_754, requires_docstrings) + requires_IEEE_754, requires_docstrings, + requires_legacy_unicode_capi) from test.support import (TestFailed, run_with_locale, cpython_only) from test.support.import_helper import import_fresh_module @@ -582,6 +583,7 @@ class ExplicitConstructionTest(unittest.TestCase): self.assertRaises(InvalidOperation, Decimal, "1_2_\u00003") @cpython_only + @requires_legacy_unicode_capi def test_from_legacy_strings(self): import _testcapi Decimal = self.decimal.Decimal @@ -2817,6 +2819,7 @@ class ContextAPItests(unittest.TestCase): Overflow]) @cpython_only + @requires_legacy_unicode_capi def test_from_legacy_strings(self): import _testcapi c = self.decimal.Context() |