This commit is contained in:
Will McGugan 2020-03-07 17:54:35 +00:00
parent 4d05ec9406
commit a1e3e55b83
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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"

View File

@ -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