|
@@ -6,6 +6,7 @@ import pytest
|
6
|
6
|
from synergine2.utils import ChunkManager
|
7
|
7
|
from synergine2_cocos2d.exception import FileNotFound
|
8
|
8
|
from synergine2_cocos2d.util import PathManager
|
|
9
|
+from synergine2_cocos2d.util import get_map_file_path_from_dir
|
9
|
10
|
from tests import BaseTest
|
10
|
11
|
|
11
|
12
|
|
|
@@ -44,3 +45,7 @@ class TestUtils(BaseTest):
|
44
|
45
|
path_manager.add_included_path('tests/fixtures/some_media2')
|
45
|
46
|
# it is prior on path finding
|
46
|
47
|
assert 'tests/fixtures/some_media2/foo.txt' == path_manager.path('foo.txt')
|
|
48
|
+
|
|
49
|
+ def test_get_map_file_path_from_dir(self):
|
|
50
|
+ assert get_map_file_path_from_dir('map/003') == 'map/003/003.tmx'
|
|
51
|
+ assert get_map_file_path_from_dir('map/003/') == 'map/003/003.tmx'
|