mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Make regular expressions in test_tasks.py raw strings. (GH-8759)
Follow up to bpo-34270.
Fixes:
```
Lib/test/test_asyncio/test_tasks.py:330: DeprecationWarning: invalid escape sequence \d
  match1 = re.match("^<Task pending name='Task-(\d+)'", repr(t1))
Lib/test/test_asyncio/test_tasks.py:332: DeprecationWarning: invalid escape sequence \d
  match2 = re.match("^<Task pending name='Task-(\d+)'", repr(t2))
```
			
			
This commit is contained in:
		
							parent
							
								
									da12063f2f
								
							
						
					
					
						commit
						aa4e4a40db
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -327,9 +327,9 @@ def notmuch(): | ||||||
|         t2 = self.new_task(self.loop, notmuch(), None) |         t2 = self.new_task(self.loop, notmuch(), None) | ||||||
|         self.assertNotEqual(repr(t1), repr(t2)) |         self.assertNotEqual(repr(t1), repr(t2)) | ||||||
| 
 | 
 | ||||||
|         match1 = re.match("^<Task pending name='Task-(\d+)'", repr(t1)) |         match1 = re.match(r"^<Task pending name='Task-(\d+)'", repr(t1)) | ||||||
|         self.assertIsNotNone(match1) |         self.assertIsNotNone(match1) | ||||||
|         match2 = re.match("^<Task pending name='Task-(\d+)'", repr(t2)) |         match2 = re.match(r"^<Task pending name='Task-(\d+)'", repr(t2)) | ||||||
|         self.assertIsNotNone(match2) |         self.assertIsNotNone(match2) | ||||||
| 
 | 
 | ||||||
|         # Autogenerated task names should have monotonically increasing numbers |         # Autogenerated task names should have monotonically increasing numbers | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson