mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-28 15:22:28 +01:00
tests: Added tileset_grid test
This commit is contained in:
19
tests/test_data/tilesets/image_grid/expected.py
Normal file
19
tests/test_data/tilesets/image_grid/expected.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pytiled_parser import tileset
|
||||
|
||||
EXPECTED = tileset.TileSet(
|
||||
columns=8,
|
||||
image=Path("../../images/tmw_desert_spacing.png"),
|
||||
image_height=199,
|
||||
image_width=265,
|
||||
margin=1,
|
||||
spacing=1,
|
||||
name="tile_set_image",
|
||||
tile_count=48,
|
||||
tiled_version="1.3.5",
|
||||
tile_height=32,
|
||||
tile_width=32,
|
||||
version=1.2,
|
||||
grid=tileset.Grid(orientation="isometric", width=32, height=32),
|
||||
)
|
||||
26
tests/test_data/tilesets/image_grid/tileset.json
Normal file
26
tests/test_data/tilesets/image_grid/tileset.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"columns": 8,
|
||||
"editorsettings": {
|
||||
"export": {
|
||||
"format": "",
|
||||
"target": "../image"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"height": 32,
|
||||
"orientation": "isometric",
|
||||
"width": 32
|
||||
},
|
||||
"image": "../../images/tmw_desert_spacing.png",
|
||||
"imageheight": 199,
|
||||
"imagewidth": 265,
|
||||
"margin": 1,
|
||||
"name": "tile_set_image",
|
||||
"spacing": 1,
|
||||
"tilecount": 48,
|
||||
"tiledversion": "1.3.5",
|
||||
"tileheight": 32,
|
||||
"tilewidth": 32,
|
||||
"type": "tileset",
|
||||
"version": 1.2
|
||||
}
|
||||
@@ -16,6 +16,7 @@ TILE_SETS = TEST_DATA / "tilesets"
|
||||
ALL_TILESET_DIRS = [
|
||||
TILE_SETS / "image",
|
||||
TILE_SETS / "image_background_color",
|
||||
TILE_SETS / "image_grid",
|
||||
TILE_SETS / "image_properties",
|
||||
TILE_SETS / "image_transparent_color",
|
||||
TILE_SETS / "image_tile_offset",
|
||||
|
||||
Reference in New Issue
Block a user