mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	gh-121842: Improve coverage of PyBytes_FromStringAndSize (#121843)
				
					
				
			This commit is contained in:
		
							parent
							
								
									37611171af
								
							
						
					
					
						commit
						f6c7d8d79c
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -53,6 +53,8 @@ def test_fromstringandsize(self):
 | 
			
		|||
        self.assertEqual(fromstringandsize(b'abc'), b'abc')
 | 
			
		||||
        self.assertEqual(fromstringandsize(b'abc', 2), b'ab')
 | 
			
		||||
        self.assertEqual(fromstringandsize(b'abc\0def'), b'abc\0def')
 | 
			
		||||
        self.assertEqual(fromstringandsize(b'a'), b'a')
 | 
			
		||||
        self.assertEqual(fromstringandsize(b'a', 1), b'a')
 | 
			
		||||
        self.assertEqual(fromstringandsize(b'', 0), b'')
 | 
			
		||||
        self.assertEqual(fromstringandsize(NULL, 0), b'')
 | 
			
		||||
        self.assertEqual(len(fromstringandsize(NULL, 3)), 3)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue