Commit 08d20c8d authored by Jason R. Coombs's avatar Jason R. Coombs

Use raw strings for regular expressions

parent cca86c7f
...@@ -39,7 +39,7 @@ def parse_distributions(s): ...@@ -39,7 +39,7 @@ def parse_distributions(s):
requires=['foo>=3.0', 'baz; extra=="feature"'] requires=['foo>=3.0', 'baz; extra=="feature"']
''' '''
s = s.strip() s = s.strip()
for spec in re.split('\n(?=[^\s])', s): for spec in re.split(r'\n(?=[^\s])', s):
if not spec: if not spec:
continue continue
fields = spec.split('\n', 1) fields = spec.split('\n', 1)
...@@ -89,7 +89,7 @@ def parametrize_test_working_set_resolve(*test_list): ...@@ -89,7 +89,7 @@ def parametrize_test_working_set_resolve(*test_list):
): ):
idlist.append(id_) idlist.append(id_)
expected = strip_comments(expected.strip()) expected = strip_comments(expected.strip())
if re.match('\w+$', expected): if re.match(r'\w+$', expected):
expected = getattr(pkg_resources, expected) expected = getattr(pkg_resources, expected)
assert issubclass(expected, Exception) assert issubclass(expected, Exception)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment