mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
This commit is contained in:
		
						commit
						ab479c49d3
					
				
					 19 changed files with 94 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -761,6 +761,10 @@ def test_find_etc_raise_correct_error_messages(self):
 | 
			
		|||
        self.assertRaisesRegex(TypeError, r'\bendswith\b', b.endswith,
 | 
			
		||||
                                x, None, None, None)
 | 
			
		||||
 | 
			
		||||
    def test_free_after_iterating(self):
 | 
			
		||||
        test.support.check_free_after_iterating(self, iter, self.type2test)
 | 
			
		||||
        test.support.check_free_after_iterating(self, reversed, self.type2test)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class BytesTest(BaseBytesTest, unittest.TestCase):
 | 
			
		||||
    type2test = bytes
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue