2022-09-22 05:38:44 +00:00
|
|
|
import pytest
|
2022-09-17 22:49:38 +00:00
|
|
|
from click.testing import CliRunner
|
|
|
|
|
|
|
|
from imaginairy.cmds import imagine_cmd
|
2022-09-22 05:38:44 +00:00
|
|
|
from imaginairy.utils import get_device
|
2022-09-17 22:49:38 +00:00
|
|
|
from tests import TESTS_FOLDER
|
|
|
|
|
|
|
|
|
2022-09-22 05:38:44 +00:00
|
|
|
@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", "5", "--outdir", f"{TESTS_FOLDER}/test_output"],
|
|
|
|
)
|
|
|
|
assert result.exit_code == 0
|