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