mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-01-19 09:04:53 +01:00
tests(map): Expanded map test coverage
This commit is contained in:
31
tests/test_data/map_tests/embedded_tileset/expected.py
Normal file
31
tests/test_data/map_tests/embedded_tileset/expected.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pytiled_parser import common_types, map, tileset
|
||||
|
||||
EXPECTED = map.Map(
|
||||
infinite=False,
|
||||
layers=[],
|
||||
map_size=common_types.Size(8, 6),
|
||||
next_layer_id=2,
|
||||
next_object_id=1,
|
||||
orientation="orthogonal",
|
||||
render_order="right-down",
|
||||
tiled_version="1.4.1",
|
||||
tile_size=common_types.Size(32, 32),
|
||||
version=1.4,
|
||||
tilesets={
|
||||
1: tileset.TileSet(
|
||||
columns=8,
|
||||
image=Path("../../images/tmw_desert_spacing.png"),
|
||||
image_width=265,
|
||||
image_height=199,
|
||||
margin=1,
|
||||
spacing=1,
|
||||
name="tileset",
|
||||
tile_count=48,
|
||||
tile_height=32,
|
||||
tile_width=32,
|
||||
firstgid=1,
|
||||
)
|
||||
},
|
||||
)
|
||||
36
tests/test_data/map_tests/embedded_tileset/map.json
Normal file
36
tests/test_data/map_tests/embedded_tileset/map.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{ "compressionlevel":0,
|
||||
"editorsettings":
|
||||
{
|
||||
"export":
|
||||
{
|
||||
"target":"."
|
||||
}
|
||||
},
|
||||
"height":6,
|
||||
"infinite":false,
|
||||
"layers":[],
|
||||
"nextlayerid":2,
|
||||
"nextobjectid":1,
|
||||
"orientation":"orthogonal",
|
||||
"renderorder":"right-down",
|
||||
"tiledversion":"1.4.1",
|
||||
"tileheight":32,
|
||||
"tilesets":[
|
||||
{
|
||||
"columns":8,
|
||||
"firstgid":1,
|
||||
"image":"..\/..\/images\/tmw_desert_spacing.png",
|
||||
"imageheight":199,
|
||||
"imagewidth":265,
|
||||
"margin":1,
|
||||
"name":"tileset",
|
||||
"spacing":1,
|
||||
"tilecount":48,
|
||||
"tileheight":32,
|
||||
"tilewidth":32
|
||||
}],
|
||||
"tilewidth":32,
|
||||
"type":"map",
|
||||
"version":1.4,
|
||||
"width":8
|
||||
}
|
||||
Reference in New Issue
Block a user