mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	gh-85287: Change codecs to raise precise UnicodeEncodeError and UnicodeDecodeError (#113674)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
This commit is contained in:
		
							parent
							
								
									c514a975ab
								
							
						
					
					
						commit
						649857a157
					
				
					 9 changed files with 306 additions and 81 deletions
				
			
		|  | @ -303,7 +303,7 @@ def test_setstate_validates_input(self): | |||
|         self.assertRaises(TypeError, decoder.setstate, 123) | ||||
|         self.assertRaises(TypeError, decoder.setstate, ("invalid", 0)) | ||||
|         self.assertRaises(TypeError, decoder.setstate, (b"1234", "invalid")) | ||||
|         self.assertRaises(UnicodeError, decoder.setstate, (b"123456789", 0)) | ||||
|         self.assertRaises(UnicodeDecodeError, decoder.setstate, (b"123456789", 0)) | ||||
| 
 | ||||
| class Test_StreamReader(unittest.TestCase): | ||||
|     def test_bug1728403(self): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 John Sloboda
						John Sloboda