first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from gpu_rent.cli import app
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
|
||||
def test_help():
|
||||
result = runner.invoke(app, ["--help"])
|
||||
assert result.exit_code == 0
|
||||
assert "doctor" in result.stdout
|
||||
|
||||
|
||||
def test_version():
|
||||
result = runner.invoke(app, ["version"])
|
||||
assert result.exit_code == 0
|
||||
assert "0.1.0" in result.stdout
|
||||
|
||||
|
||||
def test_up_nyi_after_missing_env(monkeypatch, tmp_path):
|
||||
monkeypatch.setenv("HOME", str(tmp_path))
|
||||
monkeypatch.setenv("USERPROFILE", str(tmp_path))
|
||||
result = runner.invoke(app, ["up"])
|
||||
assert result.exit_code != 0
|
||||
Reference in New Issue
Block a user