diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-06-27 22:14:28 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-06-27 22:14:28 (GMT) |
| commit | 875dbedd28b67a753b894556592cd8f3558f19e9 (patch) | |
| tree | e604c42489318d287f18cacd961bdc73c4541141 /Lib/test/test_asyncio/test_futures.py | |
| parent | a81088ae129f251ad4d1c2cb208ffd2e8d52ea4a (diff) | |
| parent | b9a301a348f8867f1b8adebd2e6a4d728889f66b (diff) | |
| download | cpython-875dbedd28b67a753b894556592cd8f3558f19e9.zip cpython-875dbedd28b67a753b894556592cd8f3558f19e9.tar.gz cpython-875dbedd28b67a753b894556592cd8f3558f19e9.tar.bz2 | |
(Merge 3.4) asyncio: Fix unit tests on Windows, escape filenames in regex
Diffstat (limited to 'Lib/test/test_asyncio/test_futures.py')
| -rw-r--r-- | Lib/test/test_asyncio/test_futures.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py index ee87261..96b41d6 100644 --- a/Lib/test/test_asyncio/test_futures.py +++ b/Lib/test/test_asyncio/test_futures.py @@ -322,9 +322,9 @@ class FutureTests(test_utils.TestCase): r'source_traceback: Object created at \(most recent call last\):\n' r' File' r'.*\n' - r' File "%s", line %s, in test_future_exception_never_retrieved\n' + r' File "{filename}", line {lineno}, in test_future_exception_never_retrieved\n' r' future = asyncio\.Future\(loop=self\.loop\)$' - % (frame[0], frame[1])) + ).format(filename=re.escape(frame[0]), lineno=frame[1]) exc_info = (type(exc), exc, exc.__traceback__) m_log.error.assert_called_once_with(mock.ANY, exc_info=exc_info) else: @@ -333,12 +333,12 @@ class FutureTests(test_utils.TestCase): r'Future/Task created at \(most recent call last\):\n' r' File' r'.*\n' - r' File "%s", line %s, in test_future_exception_never_retrieved\n' + r' File "{filename}", line {lineno}, in test_future_exception_never_retrieved\n' r' future = asyncio\.Future\(loop=self\.loop\)\n' r'Traceback \(most recent call last\):\n' r'.*\n' r'MemoryError$' - % (frame[0], frame[1])) + ).format(filename=re.escape(frame[0]), lineno=frame[1]) m_log.error.assert_called_once_with(mock.ANY, exc_info=False) message = m_log.error.call_args[0][0] self.assertRegex(message, re.compile(regex, re.DOTALL)) |
