mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-26 17:02:28 +01:00
test: fix; data -> layer data
This commit is contained in:
@@ -274,16 +274,12 @@ def _parse_tiled_objects(
|
||||
tiled_object.gid = None
|
||||
|
||||
try:
|
||||
# If any dimension is provided, they both will be
|
||||
width = float(object_element.attrib["width"])
|
||||
except KeyError:
|
||||
width = 0.0
|
||||
|
||||
try:
|
||||
height = float(object_element.attrib["height"])
|
||||
tiled_object.size = objects.Size(width, height)
|
||||
except KeyError:
|
||||
height = 0.0
|
||||
|
||||
tiled_object.size = objects.Size(width, height)
|
||||
pass
|
||||
|
||||
try:
|
||||
tiled_object.opacity = float(object_element.attrib["opacity"])
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -65,7 +65,7 @@ def test_map_simple():
|
||||
assert test_map.tile_sets[1].tiles == {}
|
||||
|
||||
# layers
|
||||
assert test_map.layers[0].data == [
|
||||
assert test_map.layers[0].layer_data == [
|
||||
[1, 2, 3, 4, 5, 6, 7, 8],
|
||||
[9, 10, 11, 12, 13, 14, 15, 16],
|
||||
[17, 18, 19, 20, 21, 22, 23, 24],
|
||||
|
||||
@@ -63,7 +63,7 @@ def test_map_simple():
|
||||
assert test_map.tile_sets[1].tiles == {}
|
||||
|
||||
# layers
|
||||
assert test_map.layers[0].data == [
|
||||
assert test_map.layers[0].layer_data == [
|
||||
[1, 2, 3, 4, 5, 6, 7, 8],
|
||||
[9, 10, 11, 12, 13, 14, 15, 16],
|
||||
[17, 18, 19, 20, 21, 22, 23, 24],
|
||||
|
||||
Reference in New Issue
Block a user