diff --git a/tests/test_flyingsnake.py b/tests/test_flyingsnake.py index ff9b61f..ed5e4d1 100644 --- a/tests/test_flyingsnake.py +++ b/tests/test_flyingsnake.py @@ -1,11 +1,22 @@ import pytest import flyingsnake from click.testing import CliRunner -from PIL import Image # Main integration test def test_full_render(): runner = CliRunner() result = runner.invoke(flyingsnake.flyingsnake, ["./tests/Small_Example.wld", "./tests/Small_Example_full.png"]) - assert Image.open("./tests/Small_Example_full.png") == Image.open("./tests/Small_Example_full_prerendered.png") + assert result.exit_code == 0 + # TODO: compare image with a valid one + + +def test_partial_render(): + runner = CliRunner() + result = runner.invoke(flyingsnake.flyingsnake, ["./tests/Small_Example.wld", "./tests/Small_Example_part.png", + "-x", "500", "-y", "500", "-w", "123", "-h", "321"]) + assert result.exit_code == 0 + # TODO: compare image with a valid one + + +# TODO: test the various options