mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
By splitting dvc.cli into a module, we'll be able to share cli-related utilities, split parser-related stuffs into smaller parts, improve reusability and improve API for command extensions in the future.
24 lines
800 B
Python
24 lines
800 B
Python
from dvc.cli import main
|
|
from dvc.ui import ui
|
|
from tests.utils import console_width
|
|
|
|
|
|
def test_status(tmp_dir, scm, dvc, machine_config, machine_instance, capsys):
|
|
|
|
assert main(["machine", "add", "bar", "aws"]) == 0
|
|
with console_width(ui.rich_console, 255):
|
|
assert main(["machine", "status"]) == 0
|
|
cap = capsys.readouterr()
|
|
assert (
|
|
"name instance status cloud instance_ip "
|
|
"instance_type instance_hdd_size instance_gpu"
|
|
) in cap.out
|
|
assert (
|
|
"bar - offline - - "
|
|
"- - -"
|
|
) in cap.out
|
|
assert (
|
|
"foo num_1 running aws 123.123.123.123 "
|
|
"m 35 None"
|
|
) in cap.out
|