Skip to content

Commit def5deb

Browse files
committed
Fix tests for typing changes
1 parent 3d8655e commit def5deb

File tree

8 files changed

+421
-410
lines changed

8 files changed

+421
-410
lines changed
Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
1-
from pathlib import Path
2-
3-
from pytiled_parser import common_types, tiled_map, tileset
4-
5-
EXPECTED = tiled_map.TiledMap(
6-
infinite=False,
7-
layers=[],
8-
map_size=common_types.Size(8, 6),
9-
next_layer_id=2,
10-
next_object_id=1,
11-
orientation="orthogonal",
12-
render_order="right-down",
13-
tiled_version="1.6.0",
14-
tile_size=common_types.Size(32, 32),
15-
version="1.6",
16-
background_color=common_types.Color(255, 0, 4, 255),
17-
tilesets={
18-
1: tileset.Tileset(
19-
columns=8,
20-
image=Path(Path(__file__).parent / "../../images/tmw_desert_spacing.png")
21-
.absolute()
22-
.resolve(),
23-
image_width=265,
24-
image_height=199,
25-
firstgid=1,
26-
margin=1,
27-
spacing=1,
28-
name="tile_set_image",
29-
tile_count=48,
30-
tiled_version="1.6.0",
31-
tile_height=32,
32-
tile_width=32,
33-
version="1.6",
34-
type="tileset",
35-
)
36-
},
37-
properties={
38-
"bool property - true": True,
39-
"color property": common_types.Color(73, 252, 255, 255),
40-
"file property": Path("../../../../../../var/log/syslog"),
41-
"float property": 1.23456789,
42-
"int property": 13,
43-
"string property": "Hello, World!!",
44-
},
45-
)
1+
from pathlib import Path
2+
3+
from pytiled_parser import common_types, tiled_map, tileset
4+
5+
EXPECTED = tiled_map.TiledMap(
6+
map_file=None,
7+
infinite=False,
8+
layers=[],
9+
map_size=common_types.Size(8, 6),
10+
next_layer_id=2,
11+
next_object_id=1,
12+
orientation="orthogonal",
13+
render_order="right-down",
14+
tiled_version="1.6.0",
15+
tile_size=common_types.Size(32, 32),
16+
version="1.6",
17+
background_color=common_types.Color(255, 0, 4, 255),
18+
tilesets={
19+
1: tileset.Tileset(
20+
columns=8,
21+
image=Path(Path(__file__).parent / "../../images/tmw_desert_spacing.png")
22+
.absolute()
23+
.resolve(),
24+
image_width=265,
25+
image_height=199,
26+
firstgid=1,
27+
margin=1,
28+
spacing=1,
29+
name="tile_set_image",
30+
tile_count=48,
31+
tiled_version="1.6.0",
32+
tile_height=32,
33+
tile_width=32,
34+
version="1.6",
35+
type="tileset",
36+
)
37+
},
38+
properties={
39+
"bool property - true": True,
40+
"color property": common_types.Color(73, 252, 255, 255),
41+
"file property": Path("../../../../../../var/log/syslog"),
42+
"float property": 1.23456789,
43+
"int property": 13,
44+
"string property": "Hello, World!!",
45+
},
46+
)
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
from pathlib import Path
2-
3-
from pytiled_parser import common_types, tiled_map, tileset
4-
5-
EXPECTED = tiled_map.TiledMap(
6-
infinite=False,
7-
layers=[],
8-
map_size=common_types.Size(8, 6),
9-
next_layer_id=2,
10-
next_object_id=1,
11-
orientation="orthogonal",
12-
render_order="right-down",
13-
tiled_version="1.6.0",
14-
tile_size=common_types.Size(32, 32),
15-
version="1.6",
16-
tilesets={
17-
1: tileset.Tileset(
18-
columns=8,
19-
image=Path("../../images/tmw_desert_spacing.png"),
20-
image_width=265,
21-
image_height=199,
22-
margin=1,
23-
spacing=1,
24-
firstgid=1,
25-
name="tileset",
26-
tile_count=48,
27-
tile_height=32,
28-
tile_width=32,
29-
)
30-
},
31-
)
1+
from pathlib import Path
2+
3+
from pytiled_parser import common_types, tiled_map, tileset
4+
5+
EXPECTED = tiled_map.TiledMap(
6+
map_file=None,
7+
infinite=False,
8+
layers=[],
9+
map_size=common_types.Size(8, 6),
10+
next_layer_id=2,
11+
next_object_id=1,
12+
orientation="orthogonal",
13+
render_order="right-down",
14+
tiled_version="1.6.0",
15+
tile_size=common_types.Size(32, 32),
16+
version="1.6",
17+
tilesets={
18+
1: tileset.Tileset(
19+
columns=8,
20+
image=Path("../../images/tmw_desert_spacing.png"),
21+
image_width=265,
22+
image_height=199,
23+
margin=1,
24+
spacing=1,
25+
firstgid=1,
26+
name="tileset",
27+
tile_count=48,
28+
tile_height=32,
29+
tile_width=32,
30+
)
31+
},
32+
)

tests/test_data/map_tests/external_tileset_dif_dir/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from pytiled_parser import common_types, layer, tiled_map, tiled_object, tileset
44

55
EXPECTED = tiled_map.TiledMap(
6+
map_file=None,
67
infinite=False,
78
map_size=common_types.Size(8, 6),
89
next_layer_id=3,

0 commit comments

Comments
 (0)