windows test fix

This commit is contained in:
Will McGugan 2020-07-27 17:27:50 +01:00
parent e5b9fd8b7d
commit eb2f0d5277
3 changed files with 9 additions and 4 deletions

View file

@ -1,5 +1,5 @@
rich.box
========
rich.emoji
==========
.. automodule:: rich.emoji
:members: Emoji

View file

@ -769,6 +769,8 @@ class Text(JupyterMixin):
Args:
separator (str, optional): String to split on. Defaults to "\n".
include_separator (bool, optional): Include the separator in the lines. Defaults to False.
allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.
Returns:
List[RichText]: A list of rich text, one per line of the original.

View file

@ -25,13 +25,16 @@ def test_dumb_terminal():
def test_16color_terminal():
console = Console(force_terminal=True, _environ={"TERM": "xterm-16color"})
assert console.color_system == "standard"
console = Console(
force_terminal=True, _environ={"TERM": "xterm-16color"}, legacy_windows=False
)
assert console.color_system in ("windows", "standard")
def test_truecolor_terminal():
console = Console(
force_terminal=True,
legacy_windows=False,
_environ={"COLORTERM": "truecolor", "TERM": "xterm-16color"},
)
assert console.color_system == "truecolor"