From 90a7224ee672ca7f58399f3c8bec9d38341b1423 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Thu, 11 Aug 2022 21:03:13 -0500 Subject: [PATCH] fix invalid escapes --- tests/render.py | 2 +- tests/test_markup.py | 2 +- tests/test_traceback.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/render.py b/tests/render.py index a2435c54..d2e5f82a 100644 --- a/tests/render.py +++ b/tests/render.py @@ -4,7 +4,7 @@ import re from rich.console import Console, RenderableType -re_link_ids = re.compile(r"id=[\d\.\-]*?;.*?\x1b") +re_link_ids = re.compile(r"id=[\d.\-]*?;.*?\x1b") def replace_link_ids(render: str) -> str: diff --git a/tests/test_markup.py b/tests/test_markup.py index 765b8326..894946b4 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -144,7 +144,7 @@ def test_markup_error(): def test_markup_escape(): - result = str(render("[dim white]\[url=[/]")) + result = str(render("[dim white][url=[/]")) assert result == "[url=" diff --git a/tests/test_traceback.py b/tests/test_traceback.py index 03705f99..9e71a159 100644 --- a/tests/test_traceback.py +++ b/tests/test_traceback.py @@ -49,7 +49,7 @@ def test_handler(): "│" + (" " * 98) + "│", ) for frame_start in re.finditer( - "^│ .+rich/tests/test_traceback\.py:", + "^│ .+rich/tests/test_traceback.py:", rendered_exception, flags=re.MULTILINE, ):