mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-01-06 03:22:43 +01:00
tests(map): Expanded map test coverage
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
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,
|
||||
background_color=common_types.Color("#ff0004"),
|
||||
tilesets={
|
||||
1: tileset.TileSet(
|
||||
columns=8,
|
||||
image=Path("../../images/tmw_desert_spacing.png"),
|
||||
image_width=265,
|
||||
image_height=199,
|
||||
margin=1,
|
||||
spacing=1,
|
||||
name="tile_set_image",
|
||||
tile_count=48,
|
||||
tiled_version="1.3.1",
|
||||
tile_height=32,
|
||||
tile_width=32,
|
||||
version=1.2,
|
||||
type="tileset",
|
||||
)
|
||||
},
|
||||
properties={
|
||||
"bool property - true": True,
|
||||
"color property": common_types.Color("#ff49fcff"),
|
||||
"file property": Path("../../../../../../var/log/syslog"),
|
||||
"float property": 1.23456789,
|
||||
"int property": 13,
|
||||
"string property": "Hello, World!!",
|
||||
},
|
||||
)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ "compressionlevel":0,
|
||||
{ "backgroundcolor":"#ff0004",
|
||||
"compressionlevel":0,
|
||||
"editorsettings":
|
||||
{
|
||||
"export":
|
||||
@@ -13,11 +14,6 @@
|
||||
"nextobjectid":1,
|
||||
"orientation":"orthogonal",
|
||||
"properties":[
|
||||
{
|
||||
"name":"bool property - false",
|
||||
"type":"bool",
|
||||
"value":false
|
||||
},
|
||||
{
|
||||
"name":"bool property - true",
|
||||
"type":"bool",
|
||||
|
||||
Reference in New Issue
Block a user