Files
pytiled_parser/tests/test_tileset.py
Benjamin Kirkbride b735857fe6 test: tileset stuff
2020-06-04 20:10:40 -04:00

24 lines
605 B
Python

"""Tests for tilesets"""
import json
import os
from pathlib import Path
import pytest
from pytiled_parser import tileset
TESTS_DIR = Path(os.path.dirname(os.path.abspath(__file__)))
TEST_DATA = TESTS_DIR / "test_data"
TILE_SETS = TEST_DATA / "tilesets"
ALL_TILESETS = TILE_SETS.glob("*.json")
@pytest.mark.parametrize("raw_tileset", ALL_TILESETS)
def test_tilesets_integration(raw_tileset):
""" This could be redundant, but it is useful just to ensure that anything in there
is at least sanity checked"""
tileset_ = tileset.cast(json.loads(raw_tileset))
assert tileset_ is not None