mirror of https://github.com/Textualize/rich.git
test fix
This commit is contained in:
parent
4d05ec9406
commit
a1e3e55b83
2
Makefile
2
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:
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue