File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 55
66import pytest
77
8- from pytiled_parser import world
8+ from pytiled_parser import OrderedPair , world
99
1010TESTS_DIR = Path (os .path .dirname (os .path .abspath (__file__ )))
1111TEST_DATA = TESTS_DIR / "test_data"
1818]
1919
2020
21+ def fix_world_map (world_map ):
22+ world_map .coordinates = OrderedPair (
23+ round (world_map .coordinates [0 ], 3 ), round (world_map .coordinates [1 ], 3 )
24+ )
25+
26+
27+ def fix_world (world ):
28+ for world_map in world .maps :
29+ fix_world_map (world_map )
30+
2131@pytest .mark .parametrize ("world_test" , ALL_WORLD_TESTS )
2232def test_world_integration (world_test ):
2333 # it's a PITA to import like this, don't do it
@@ -31,5 +41,6 @@ def test_world_integration(world_test):
3141 raw_world_path = world_test / "world.world"
3242
3343 casted_world = world .parse_world (raw_world_path )
44+ fix_world (casted_world )
3445
3546 assert casted_world == expected .EXPECTED
You can’t perform that action at this time.
0 commit comments