mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-10-31 03:20:40 +00:00
test: add smoke test for edit command
This commit is contained in:
parent
1563e0b871
commit
7b684b6e5c
@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
from click.testing import CliRunner
|
||||
|
||||
from imaginairy.cmds import imagine_cmd
|
||||
from imaginairy.cmds import edit_image, imagine_cmd
|
||||
from imaginairy.utils import get_device
|
||||
from tests import TESTS_FOLDER
|
||||
|
||||
@ -22,3 +22,19 @@ def test_imagine_cmd():
|
||||
],
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
|
||||
|
||||
@pytest.mark.skipif(get_device() == "cpu", reason="Too slow to run on CPU")
|
||||
def test_edit_cmd():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(
|
||||
edit_image,
|
||||
[
|
||||
f"{TESTS_FOLDER}/data/dog.jpg",
|
||||
"--steps",
|
||||
"1",
|
||||
"-p",
|
||||
"turn the dog into a cat",
|
||||
],
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
|
Loading…
Reference in New Issue
Block a user