mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-27 14:52:15 +01:00
refactor(map): Renamed map to tiled_map to avoid redefining the built-in
This commit is contained in:
@@ -4,6 +4,6 @@
|
||||
|
||||
from .common_types import OrderedPair, Size
|
||||
from .layer import Layer
|
||||
from .map import Map
|
||||
from .properties import Properties
|
||||
from .tiled_map import Map
|
||||
from .tileset import TileSet
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pytiled_parser import common_types, map, tileset
|
||||
from pytiled_parser import common_types, tiled_map, tileset
|
||||
|
||||
EXPECTED = map.Map(
|
||||
EXPECTED = tiled_map.Map(
|
||||
infinite=False,
|
||||
layers=[],
|
||||
map_size=common_types.Size(8, 6),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pytiled_parser import common_types, layer, map, tileset
|
||||
from pytiled_parser import common_types, layer, tiled_map, tileset
|
||||
|
||||
EXPECTED = map.Map(
|
||||
EXPECTED = tiled_map.Map(
|
||||
hex_side_length=6,
|
||||
stagger_axis="y",
|
||||
stagger_index="odd",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pytiled_parser import common_types, map, tileset
|
||||
from pytiled_parser import common_types, tiled_map, tileset
|
||||
|
||||
EXPECTED = map.Map(
|
||||
EXPECTED = tiled_map.Map(
|
||||
infinite=False,
|
||||
layers=[],
|
||||
map_size=common_types.Size(8, 6),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pytiled_parser import common_types, map, tileset
|
||||
from pytiled_parser import common_types, tiled_map, tileset
|
||||
|
||||
EXPECTED = map.Map(
|
||||
EXPECTED = tiled_map.Map(
|
||||
infinite=False,
|
||||
layers=[],
|
||||
map_size=common_types.Size(8, 6),
|
||||
|
||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from pytiled_parser import map as map_
|
||||
from pytiled_parser import tiled_map
|
||||
|
||||
TESTS_DIR = Path(os.path.dirname(os.path.abspath(__file__)))
|
||||
TEST_DATA = TESTS_DIR / "test_data"
|
||||
@@ -29,6 +29,6 @@ def test_map_integration(map_test):
|
||||
|
||||
raw_maps_path = map_test / "map.json"
|
||||
|
||||
casted_map = map_.cast(raw_maps_path)
|
||||
casted_map = tiled_map.cast(raw_maps_path)
|
||||
|
||||
assert casted_map == expected.EXPECTED
|
||||
|
||||
Reference in New Issue
Block a user