summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2018-08-14 04:32:30 (GMT)
committerGitHub <noreply@github.com>2018-08-14 04:32:30 (GMT)
commitaa4e4a40db531f7095513a4b0aa6510f18162a07 (patch)
tree45cca7e78f4c65a9baf8c16c7e57326dd9c37b61 /Lib
parentda12063f2f53b7d272824863ed24260cefb22e8c (diff)
downloadcpython-aa4e4a40db531f7095513a4b0aa6510f18162a07.zip
cpython-aa4e4a40db531f7095513a4b0aa6510f18162a07.tar.gz
cpython-aa4e4a40db531f7095513a4b0aa6510f18162a07.tar.bz2
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)) ```
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index c930593..40d1953 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -327,9 +327,9 @@ class BaseTaskTests:
t2 = self.new_task(self.loop, notmuch(), None)
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)
- match2 = re.match("^<Task pending name='Task-(\d+)'", repr(t2))
+ match2 = re.match(r"^<Task pending name='Task-(\d+)'", repr(t2))
self.assertIsNotNone(match2)
# Autogenerated task names should have monotonically increasing numbers