-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_cli.py
More file actions
33 lines (23 loc) · 745 Bytes
/
test_cli.py
File metadata and controls
33 lines (23 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Smoke tests — CLI sem carregar o modelo."""
from click.testing import CliRunner
from text2d.cli import cli
def test_root_help():
runner = CliRunner()
r = runner.invoke(cli, ["--help"])
assert r.exit_code == 0
assert "Text2D" in r.output
def test_generate_help():
runner = CliRunner()
r = runner.invoke(cli, ["generate", "--help"])
assert r.exit_code == 0
assert "PROMPT" in r.output or "prompt" in r.output.lower()
def test_info():
runner = CliRunner()
r = runner.invoke(cli, ["info"])
assert r.exit_code == 0
assert "PyTorch" in r.output
def test_models():
runner = CliRunner()
r = runner.invoke(cli, ["models"])
assert r.exit_code == 0
assert "Disty0" in r.output