mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 01:58:24 +00:00
Fix deprecation warnings due to invalid escape sequences.
This commit is contained in:
parent
1501671a4d
commit
58b7224e93
2 changed files with 3 additions and 3 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue