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
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))
import gc
import pickle
from test import support
+from test.support import warnings_helper
from itertools import permutations
from textwrap import dedent
from collections import OrderedDict
@support.cpython_only
@support.requires_legacy_unicode_capi
+ @warnings_helper.ignore_warnings(category=DeprecationWarning)
def test_writerows_legacy_strings(self):
import _testcapi
c = _testcapi.unicode_legacy_string('a')
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
@cpython_only
@requires_legacy_unicode_capi
+ @warnings_helper.ignore_warnings(category=DeprecationWarning)
def test_from_legacy_strings(self):
import _testcapi
Decimal = self.decimal.Decimal
@cpython_only
@requires_legacy_unicode_capi
+ @warnings_helper.ignore_warnings(category=DeprecationWarning)
def test_from_legacy_strings(self):
import _testcapi
c = self.decimal.Context()