mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
gh-109050: Remove remaining tests for legacy Unicode C API (GH-109068)
This commit is contained in:
parent
17f994174d
commit
b4131a13cb
6 changed files with 1 additions and 197 deletions
|
@ -281,18 +281,6 @@ class Test_Csv(unittest.TestCase):
|
|||
self.assertRaises(TypeError, writer.writerows, None)
|
||||
self.assertRaises(OSError, writer.writerows, BadIterable())
|
||||
|
||||
@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')
|
||||
with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj:
|
||||
writer = csv.writer(fileobj)
|
||||
writer.writerows([[c]])
|
||||
fileobj.seek(0)
|
||||
self.assertEqual(fileobj.read(), "a\r\n")
|
||||
|
||||
def _read_test(self, input, expect, **kwargs):
|
||||
reader = csv.reader(input, **kwargs)
|
||||
result = list(reader)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue