imaginAIry/tests/test_cmds.py

25 lines
579 B
Python
Raw Normal View History

import pytest
2022-09-17 22:49:38 +00:00
from click.testing import CliRunner
from imaginairy.cmds import imagine_cmd
from imaginairy.utils import get_device
2022-09-17 22:49:38 +00:00
from tests import TESTS_FOLDER
@pytest.mark.skipif(get_device() == "cpu", reason="Too slow to run on CPU")
2022-09-17 22:49:38 +00:00
def test_imagine_cmd():
runner = CliRunner()
result = runner.invoke(
imagine_cmd,
[
"gold coins",
"--steps",
"25",
"--outdir",
f"{TESTS_FOLDER}/test_output",
"--seed",
"703425280",
],
2022-09-17 22:49:38 +00:00
)
assert result.exit_code == 0