mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Increase coverage
This commit is contained in:
parent
3b73dd670c
commit
59a62aa7e2
1 changed files with 5 additions and 2 deletions
|
|
@ -3130,15 +3130,18 @@ def test_uu_invalid(self):
|
|||
|
||||
def test_invalid_error_input(self):
|
||||
# decoders/encoders require errors == 'strict'
|
||||
|
||||
for encoding in bytes_transform_encodings:
|
||||
with self.subTest(encoding=encoding):
|
||||
with (self.subTest(encoding=encoding)):
|
||||
encoder = codecs.getencoder(encoding)
|
||||
decoder = codecs.getdecoder(encoding)
|
||||
|
||||
self.assertRaises(ValueError, encoder, 'in', errors='notstrict')
|
||||
self.assertRaises(ValueError, decoder, 'in', errors='notstrict')
|
||||
|
||||
incdev = codecs.getincrementaldecoder(encoding)
|
||||
if encoding not in ('base64_codec', 'uu_codec', 'quopri_codec', 'hex_codec'):
|
||||
self.assertRaises(ValueError, incdev, errors='notstrict')
|
||||
|
||||
|
||||
|
||||
# The codec system tries to add notes to exceptions in order to ensure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue