test: fix; data -> layer data

This commit is contained in:
Benjamin Kirkbride
2020-04-20 20:44:23 -04:00
parent 6788a4937b
commit cd898c7bb2
4 changed files with 7 additions and 11 deletions

View File

@@ -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

View File

@@ -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],

View File

@@ -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],