mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Split the bigmem re test in two separate tests with different memory requirements.
This commit is contained in:
		
						commit
						b33941ab02
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		|  | @ -949,10 +949,17 @@ def test_compile(self): | |||
|         # Test behaviour when not given a string or pattern as parameter | ||||
|         self.assertRaises(TypeError, re.compile, 0) | ||||
| 
 | ||||
|     @bigmemtest(size=_2G, memuse=1) | ||||
|     def test_large_search(self, size): | ||||
|         # Issue #10182: indices were 32-bit-truncated. | ||||
|         s = 'a' * size | ||||
|         m = re.search('$', s) | ||||
|         self.assertIsNotNone(m) | ||||
| 
 | ||||
|     # The huge memuse is because of re.sub() using a list and a join() | ||||
|     # to create the replacement result. | ||||
|     @bigmemtest(size=_2G, memuse=20) | ||||
|     def test_large(self, size): | ||||
|     @bigmemtest(size=_2G, memuse=16 + 2) | ||||
|     def test_large_subn(self, size): | ||||
|         # Issue #10182: indices were 32-bit-truncated. | ||||
|         s = 'a' * size | ||||
|         m = re.search('$', s) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Antoine Pitrou
						Antoine Pitrou