mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	GH-116377: Stop raising ValueError from glob.translate(). (#116378)
				
					
				
			Stop raising `ValueError` from `glob.translate()` when a `**` sub-string appears in a non-recursive pattern segment. This matches `glob.glob()` behaviour.
This commit is contained in:
		
							parent
							
								
									1cf0301086
								
							
						
					
					
						commit
						0634201f53
					
				
					 4 changed files with 18 additions and 26 deletions
				
			
		|  | @ -512,8 +512,6 @@ def test_full_match_common(self): | |||
|         self.assertFalse(P('a/b/c.py').full_match('**/a/b/c./**')) | ||||
|         self.assertFalse(P('a/b/c.py').full_match('/a/b/c.py/**')) | ||||
|         self.assertFalse(P('a/b/c.py').full_match('/**/a/b/c.py')) | ||||
|         self.assertRaises(ValueError, P('a').full_match, '**a/b/c') | ||||
|         self.assertRaises(ValueError, P('a').full_match, 'a/b/c**') | ||||
|         # Case-sensitive flag | ||||
|         self.assertFalse(P('A.py').full_match('a.PY', case_sensitive=True)) | ||||
|         self.assertTrue(P('A.py').full_match('a.PY', case_sensitive=False)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Barney Gale
						Barney Gale