mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	[3.13] gh-122311: Fix some error messages in pickle (GH-122386) (GH-122387)
(cherry picked from commit 3b034d26eb)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
			
			
This commit is contained in:
		
							parent
							
								
									d113359341
								
							
						
					
					
						commit
						c26dd270f7
					
				
					 4 changed files with 11 additions and 7 deletions
				
			
		|  | @ -1982,8 +1982,10 @@ def test_picklebuffer_error(self): | |||
|         pb = pickle.PickleBuffer(b"foobar") | ||||
|         for proto in range(0, 5): | ||||
|             with self.subTest(proto=proto): | ||||
|                 with self.assertRaises(pickle.PickleError): | ||||
|                 with self.assertRaises(pickle.PickleError) as cm: | ||||
|                     self.dumps(pb, proto) | ||||
|                 self.assertEqual(str(cm.exception), | ||||
|                     'PickleBuffer can only be pickled with protocol >= 5') | ||||
| 
 | ||||
|     def test_non_continuous_buffer(self): | ||||
|         if self.pickler is pickle._Pickler: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)