mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
give the C implementation of TextIOWrapper the errors property #6217
This commit is contained in:
parent
3bbbf18a38
commit
0926ad1f05
7 changed files with 50 additions and 26 deletions
|
@ -2024,6 +2024,12 @@ class TextIOWrapperTest(unittest.TestCase):
|
|||
with self.open(filename, 'rb') as f:
|
||||
self.assertEquals(f.read(), 'bbbzzz'.encode(charset))
|
||||
|
||||
def test_errors_property(self):
|
||||
with self.open(support.TESTFN, "w") as f:
|
||||
self.assertEqual(f.errors, "strict")
|
||||
with self.open(support.TESTFN, "w", errors="replace") as f:
|
||||
self.assertEqual(f.errors, "replace")
|
||||
|
||||
|
||||
class CTextIOWrapperTest(TextIOWrapperTest):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue