summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2020-07-20 03:02:50 (GMT)
committerGitHub <noreply@github.com>2020-07-20 03:02:50 (GMT)
commit902356a7b0564e2c9659aaec56211de4d37109d0 (patch)
treea052987fd1daa442783155f2748c48de1322fa91 /Lib/test/test_decimal.py
parentbfd0fbdc1352534b3c91b46dbae4285f5220acf4 (diff)
downloadcpython-902356a7b0564e2c9659aaec56211de4d37109d0.zip
cpython-902356a7b0564e2c9659aaec56211de4d37109d0.tar.gz
cpython-902356a7b0564e2c9659aaec56211de4d37109d0.tar.bz2
bpo-41338: Fix DeprecationWarning in tests (GH-21542)
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 9dbae44..5d0992a 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -38,6 +38,7 @@ from test.support import (run_unittest, run_doctest, is_resource_enabled,
from test.support import (TestFailed,
run_with_locale, cpython_only)
from test.support.import_helper import import_fresh_module
+from test.support import warnings_helper
import random
import inspect
import threading
@@ -584,6 +585,7 @@ class ExplicitConstructionTest(unittest.TestCase):
@cpython_only
@requires_legacy_unicode_capi
+ @warnings_helper.ignore_warnings(category=DeprecationWarning)
def test_from_legacy_strings(self):
import _testcapi
Decimal = self.decimal.Decimal
@@ -2820,6 +2822,7 @@ class ContextAPItests(unittest.TestCase):
@cpython_only
@requires_legacy_unicode_capi
+ @warnings_helper.ignore_warnings(category=DeprecationWarning)
def test_from_legacy_strings(self):
import _testcapi
c = self.decimal.Context()