mirror of https://github.com/Textualize/rich.git
for environment to empty in tests
This commit is contained in:
parent
22989e4212
commit
13589da335
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
|||
test:
|
||||
pytest --cov-report term-missing --cov=rich tests/ -vv
|
||||
TERM=unknown pytest --cov-report term-missing --cov=rich tests/ -vv
|
||||
format-check:
|
||||
black --check .
|
||||
format:
|
||||
|
|
|
@ -686,7 +686,7 @@ def test_is_alt_screen():
|
|||
|
||||
|
||||
def test_update_screen():
|
||||
console = Console(force_terminal=True, width=20, height=5)
|
||||
console = Console(force_terminal=True, width=20, height=5, _environ={})
|
||||
if console.legacy_windows:
|
||||
return
|
||||
with pytest.raises(errors.NoAltScreen):
|
||||
|
|
|
@ -86,7 +86,7 @@ def test_tree():
|
|||
def test_refresh_screen():
|
||||
layout = Layout()
|
||||
layout.split_row(Layout(name="foo"), Layout(name="bar"))
|
||||
console = Console(force_terminal=True, width=20, height=5)
|
||||
console = Console(force_terminal=True, width=20, height=5, _environ={})
|
||||
with console.capture():
|
||||
console.print(layout)
|
||||
with console.screen():
|
||||
|
|
|
@ -41,7 +41,7 @@ def test_spinner_update():
|
|||
nonlocal time
|
||||
return time
|
||||
|
||||
console = Console(width=20, force_terminal=True, get_time=get_time)
|
||||
console = Console(width=20, force_terminal=True, get_time=get_time, _environ={})
|
||||
console.begin_capture()
|
||||
spinner = Spinner("dots")
|
||||
console.print(spinner)
|
||||
|
|
|
@ -67,7 +67,9 @@ def test_render_tree_non_win32():
|
|||
baz_tree.add("2")
|
||||
tree.add("egg")
|
||||
|
||||
console = Console(width=20, force_terminal=True, color_system="standard")
|
||||
console = Console(
|
||||
width=20, force_terminal=True, color_system="standard", _environ={}
|
||||
)
|
||||
console.begin_capture()
|
||||
console.print(tree)
|
||||
result = console.end_capture()
|
||||
|
@ -103,7 +105,9 @@ def test_render_tree_hide_root_non_win32():
|
|||
baz_tree.add("2")
|
||||
tree.add("egg")
|
||||
|
||||
console = Console(width=20, force_terminal=True, color_system="standard")
|
||||
console = Console(
|
||||
width=20, force_terminal=True, color_system="standard", _environ={}
|
||||
)
|
||||
console.begin_capture()
|
||||
console.print(tree)
|
||||
result = console.end_capture()
|
||||
|
|
Loading…
Reference in New Issue