mirror of
https://github.com/Steffo99/flyingsnake.git
synced 2024-12-21 14:14:19 +00:00
Add integration test
This commit is contained in:
parent
4f58c11524
commit
ee62cfea9e
6 changed files with 20 additions and 1 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*.wld filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,5 +5,4 @@ settings.xml
|
|||
dist/
|
||||
**/__pycache__/
|
||||
setup/
|
||||
sample_world/
|
||||
build/
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
click>=7.0
|
||||
lihzahrd>=1.0b1
|
||||
Pillow>=6.1.0
|
||||
pytest>=5.1.3
|
||||
|
|
BIN
tests/Small_Example_full.png
(Stored with Git LFS)
Normal file
BIN
tests/Small_Example_full.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
tests/Small_Example_full_prerendered.png
(Stored with Git LFS)
Normal file
BIN
tests/Small_Example_full_prerendered.png
(Stored with Git LFS)
Normal file
Binary file not shown.
11
tests/test_flyingsnake.py
Normal file
11
tests/test_flyingsnake.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
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, ["./Small_Example.wld", "./Small_Example_full.png"])
|
||||
assert Image.open("./Small_Example_full.png") == Image.open("./Small_Example_full_prerendered.png")
|
Loading…
Reference in a new issue