From 37c94bbe714aa5ac7b17ac8e54a290721262c625 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sun, 17 Jun 2018 23:51:03 -0700 Subject: [PATCH] Fix invalid escape sequences --- testing/util.py | 2 +- tests/commands/try_repo_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/util.py b/testing/util.py index 42cf07eb..6a66c7c9 100644 --- a/testing/util.py +++ b/testing/util.py @@ -53,7 +53,7 @@ def broken_deep_listdir(): # pragma: no cover (platform specific) except OSError: return True try: - os.listdir(b'\\\\?\C:' + b'\\' * 300) + os.listdir(b'\\\\?\\C:' + b'\\' * 300) except TypeError: return True except OSError: diff --git a/tests/commands/try_repo_test.py b/tests/commands/try_repo_test.py index 490cdd56..66d1642d 100644 --- a/tests/commands/try_repo_test.py +++ b/tests/commands/try_repo_test.py @@ -19,7 +19,7 @@ def try_repo_opts(repo, ref=None, **kwargs): def _get_out(cap_out): out = cap_out.get().replace('\r\n', '\n') - out = re.sub('\[INFO\].+\n', '', out) + out = re.sub(r'\[INFO\].+\n', '', out) start, using_config, config, rest = out.split('=' * 79 + '\n') assert start == '' assert using_config == 'Using config:\n'