File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919from test .support import MISSING_C_DOCSTRINGS
2020from test .support import import_helper
2121from test .support import threading_helper
22+ from test .support import warnings_helper
2223from test .support .script_helper import assert_python_failure , assert_python_ok
2324try :
2425 import _posixsubprocess
@@ -700,6 +701,11 @@ class Test_testcapi(unittest.TestCase):
700701 for name in dir (_testcapi )
701702 if name .startswith ('test_' ) and not name .endswith ('_code' ))
702703
704+ # Suppress warning from PyUnicode_FromUnicode().
705+ @warnings_helper .ignore_warnings (category = DeprecationWarning )
706+ def test_widechar (self ):
707+ _testcapi .test_widechar ()
708+
703709
704710class Test_testinternalcapi (unittest .TestCase ):
705711 locals ().update ((name , getattr (_testinternalcapi , name ))
Original file line number Diff line number Diff line change 1010import gc
1111import pickle
1212from test import support
13+ from test .support import warnings_helper
1314from itertools import permutations
1415from textwrap import dedent
1516from collections import OrderedDict
@@ -251,6 +252,7 @@ def test_writerows_errors(self):
251252
252253 @support .cpython_only
253254 @support .requires_legacy_unicode_capi
255+ @warnings_helper .ignore_warnings (category = DeprecationWarning )
254256 def test_writerows_legacy_strings (self ):
255257 import _testcapi
256258 c = _testcapi .unicode_legacy_string ('a' )
Original file line number Diff line number Diff line change 3838from test .support import (TestFailed ,
3939 run_with_locale , cpython_only )
4040from test .support .import_helper import import_fresh_module
41+ from test .support import warnings_helper
4142import random
4243import inspect
4344import threading
@@ -584,6 +585,7 @@ def test_explicit_from_string(self):
584585
585586 @cpython_only
586587 @requires_legacy_unicode_capi
588+ @warnings_helper .ignore_warnings (category = DeprecationWarning )
587589 def test_from_legacy_strings (self ):
588590 import _testcapi
589591 Decimal = self .decimal .Decimal
@@ -2820,6 +2822,7 @@ def test_none_args(self):
28202822
28212823 @cpython_only
28222824 @requires_legacy_unicode_capi
2825+ @warnings_helper .ignore_warnings (category = DeprecationWarning )
28232826 def test_from_legacy_strings (self ):
28242827 import _testcapi
28252828 c = self .decimal .Context ()
You can’t perform that action at this time.
0 commit comments