mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
windows test fix
This commit is contained in:
parent
e5b9fd8b7d
commit
eb2f0d5277
3 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
rich.box
|
||||
========
|
||||
rich.emoji
|
||||
==========
|
||||
|
||||
.. automodule:: rich.emoji
|
||||
:members: Emoji
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue