2023-11-17 10:05:15 +00:00
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
2023-12-08 23:04:56 +00:00
|
|
|
import pytest
|
2023-11-17 10:05:15 +00:00
|
|
|
from cli import Cli
|
|
|
|
from fixtures_flakes import FlakeForTest
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
pass
|
|
|
|
|
2023-12-12 13:03:10 +00:00
|
|
|
|
2023-12-08 23:04:56 +00:00
|
|
|
@pytest.mark.impure
|
|
|
|
def test_flakes_inspect(
|
|
|
|
test_flake_with_core: FlakeForTest, capsys: pytest.CaptureFixture
|
|
|
|
) -> None:
|
|
|
|
cli = Cli()
|
|
|
|
cli.run(
|
|
|
|
[
|
|
|
|
"flakes",
|
|
|
|
"inspect",
|
2024-05-29 08:10:10 +00:00
|
|
|
"--flake",
|
|
|
|
str(test_flake_with_core.path),
|
2023-12-08 23:04:56 +00:00
|
|
|
"--machine",
|
|
|
|
"vm1",
|
|
|
|
]
|
|
|
|
)
|
|
|
|
out = capsys.readouterr() # empty the buffer
|
|
|
|
|
|
|
|
assert "Icon" in out.out
|