mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Webhost: fix doc and yaml filenames / install paths (#4193)
* WebHost: use new safe yaml template filename this mirrors the change in ArchipelagoMW/#4106 in WebHost * WebHost: install docs into safe filename and require docs to be named safe * Test: update doc test for safe name * WebHost: fix import order to not break ModuleUpdate
This commit is contained in:
@@ -30,10 +30,16 @@ class TestDocs(unittest.TestCase):
|
||||
def test_has_game_info(self):
|
||||
for game_name, world_type in AutoWorldRegister.world_types.items():
|
||||
if not world_type.hidden:
|
||||
target_path = Utils.local_path("WebHostLib", "static", "generated", "docs", game_name)
|
||||
safe_name = Utils.get_file_safe_name(game_name)
|
||||
target_path = Utils.local_path("WebHostLib", "static", "generated", "docs", safe_name)
|
||||
for game_info_lang in world_type.web.game_info_languages:
|
||||
with self.subTest(game_name):
|
||||
self.assertTrue(
|
||||
os.path.isfile(Utils.local_path(target_path, f'{game_info_lang}_{game_name}.md')),
|
||||
safe_name == game_name or
|
||||
not os.path.isfile(Utils.local_path(target_path, f'{game_info_lang}_{game_name}.md')),
|
||||
f'Info docs have be named <lang>_{safe_name}.md for {game_name}.'
|
||||
)
|
||||
self.assertTrue(
|
||||
os.path.isfile(Utils.local_path(target_path, f'{game_info_lang}_{safe_name}.md')),
|
||||
f'{game_name} missing game info file for "{game_info_lang}" language.'
|
||||
)
|
||||
|
Reference in New Issue
Block a user