From a1e3e55b83abd60caf3e53592b52af428a8760cd Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sat, 7 Mar 2020 17:54:35 +0000 Subject: [PATCH] test fix --- Makefile | 2 +- tests/test_style.py | 2 +- tests/test_text.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index be4d23dd..8cd7b3c2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ test: - pytest --cov-report term-missing --cov=rich tests/ -v + pytest --cov-report term-missing --cov=rich tests/ -vv typecheck: mypy -p rich --ignore-missing-imports --warn-unreachable typecheck-report: diff --git a/tests/test_style.py b/tests/test_style.py index ac467b6e..a2bbe746 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -100,7 +100,7 @@ def test_render(): assert Style(color="red").render("foo", color_system=None) == "foo" assert ( Style(color="red", bgcolor="black", bold=True).render("foo") - == "\x1b[31;40;1mfoo" + == "\x1b[31;40;1mfoo\x1b[0m" ) assert Style().render("foo") == "foo" diff --git a/tests/test_text.py b/tests/test_text.py index e1a9ec47..11fa06af 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -272,7 +272,7 @@ def test_render(): ) console.print(test) output = console.export_text(styles=True) - expected = "\x1b[1;4mWhere\x1b[0m\x1b[4m there is \x1b[0m\n\x1b[0m\x1b[4ma \x1b[0m\x1b[3;4mWill\x1b[0m\x1b[4m, there \x1b[0m\n\x1b[0m\x1b[4mis a Way.\x1b[0m\n\x1b[0m" + expected = "\x1b[1;4mWhere\x1b[0m\x1b[4m there is \x1b[0m\n\x1b[4ma \x1b[0m\x1b[3;4mWill\x1b[0m\x1b[4m, there \x1b[0m\n\x1b[4mis a Way.\x1b[0m\n" assert output == expected