Skip to content

Commit 59a62aa

Browse files
Increase coverage
1 parent 3b73dd6 commit 59a62aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/test_codecs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,15 +3130,18 @@ def test_uu_invalid(self):
31303130

31313131
def test_invalid_error_input(self):
31323132
# decoders/encoders require errors == 'strict'
3133-
31343133
for encoding in bytes_transform_encodings:
3135-
with self.subTest(encoding=encoding):
3134+
with (self.subTest(encoding=encoding)):
31363135
encoder = codecs.getencoder(encoding)
31373136
decoder = codecs.getdecoder(encoding)
31383137

31393138
self.assertRaises(ValueError, encoder, 'in', errors='notstrict')
31403139
self.assertRaises(ValueError, decoder, 'in', errors='notstrict')
31413140

3141+
incdev = codecs.getincrementaldecoder(encoding)
3142+
if encoding not in ('base64_codec', 'uu_codec', 'quopri_codec', 'hex_codec'):
3143+
self.assertRaises(ValueError, incdev, errors='notstrict')
3144+
31423145

31433146

31443147
# The codec system tries to add notes to exceptions in order to ensure

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy