bpo-41338: Fix DeprecationWarning in tests (GH-21542)

This commit is contained in:
Inada Naoki 2020-07-20 12:02:50 +09:00 committed by GitHub
parent bfd0fbdc13
commit 902356a7b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -10,6 +10,7 @@ import csv
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
@ -251,6 +252,7 @@ class Test_Csv(unittest.TestCase):
@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')