Fix deprecation warnings due to invalid escape sequences.

This commit is contained in:
Karthikeyan Singaravelan 2020-08-05 13:08:38 +00:00
parent 1501671a4d
commit 58b7224e93
2 changed files with 3 additions and 3 deletions

View file

@ -23,11 +23,11 @@ def test_re_match():
def test_escape():
assert escape("foo[bar]") == "foo\[bar]"
assert escape("foo[bar]") == r"foo\[bar]"
def test_parse():
result = list(_parse("[foo]hello[/foo][bar]world[/]\[escaped]"))
result = list(_parse(r"[foo]hello[/foo][bar]world[/]\[escaped]"))
expected = [
(0, None, Tag(name="foo", parameters=None)),
(10, "hello", None),