Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid escape sequence fixes #638

Merged
merged 2 commits into from
Sep 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ def test_substitution_double(self, newconfig):
assert argv[0] == ['echo', 'bah']

def test_posargs_backslashed_or_quoted(self, tmpdir, newconfig):
inisource = """
inisource = r"""
[testenv:py27]
commands =
echo "\{posargs\}" = {posargs}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class envconfig:
name = "python%s" % ver
if sys.platform == "win32":
pydir = "python%s" % ver.replace(".", "")
x = py.path.local("c:\%s" % pydir)
x = py.path.local(r"c:\%s" % pydir)
print(x)
if not x.check():
continue
Expand Down
2 changes: 1 addition & 1 deletion tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def __init__(self, name, url=None):

#: Check value matches substitution form
#: of referencing value from other section. E.g. {[base]commands}
is_section_substitution = re.compile("{\[[^{}\s]+\]\S+?}").match
is_section_substitution = re.compile(r"{\[[^{}\s]+\]\S+?}").match


class SectionReader:
Expand Down
2 changes: 1 addition & 1 deletion tox/interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def tox_get_python_executable(envconfig):
# Exceptions to the usual windows mapping
win32map = {
'python': sys.executable,
'jython': "c:\jython2.5.1\jython.bat",
'jython': r"c:\jython2.5.1\jython.bat",
}

def locate_via_py(v_maj, v_min):
Expand Down
2 changes: 1 addition & 1 deletion tox/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ def _resolvepkg(self, pkgspec):
return candidates[0]


_rex_getversion = re.compile("[\w_\-\+\.]+-(.*)(\.zip|\.tar.gz)")
_rex_getversion = re.compile(r"[\w_\-\+\.]+-(.*)\.(zip|tar\.gz)")


def getversion(basename):
Expand Down