summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi.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_capi.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_capi.py')
-rw-r--r--Lib/test/test_capi.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 55027c9..892cc74 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -19,6 +19,7 @@ from test import support
from test.support import MISSING_C_DOCSTRINGS
from test.support import import_helper
from test.support import threading_helper
+from test.support import warnings_helper
from test.support.script_helper import assert_python_failure, assert_python_ok
try:
import _posixsubprocess
@@ -700,6 +701,11 @@ class Test_testcapi(unittest.TestCase):
for name in dir(_testcapi)
if name.startswith('test_') and not name.endswith('_code'))
+ # Suppress warning from PyUnicode_FromUnicode().
+ @warnings_helper.ignore_warnings(category=DeprecationWarning)
+ def test_widechar(self):
+ _testcapi.test_widechar()
+
class Test_testinternalcapi(unittest.TestCase):
locals().update((name, getattr(_testinternalcapi, name))