mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	#7475: add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2.
This commit is contained in:
		
							parent
							
								
									de0ab5eab3
								
							
						
					
					
						commit
						02524629f3
					
				
					 17 changed files with 900 additions and 29 deletions
				
			
		|  | @ -207,6 +207,11 @@ def test_decode(self): | |||
|         self.assertEqual(b.decode(errors="ignore", encoding="utf8"), | ||||
|                          "Hello world\n") | ||||
| 
 | ||||
|     def test_transform(self): | ||||
|         b1 = self.type2test(range(256)) | ||||
|         b2 = b1.transform("base64").untransform("base64") | ||||
|         self.assertEqual(b2, b1) | ||||
| 
 | ||||
|     def test_from_int(self): | ||||
|         b = self.type2test(0) | ||||
|         self.assertEqual(b, self.type2test()) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl