1
0
mirror of synced 2025-01-23 22:54:08 +01:00

tests/: Add sorting for generated songs

This makes things nicer to debug, since we're following an expected order.
This commit is contained in:
Viv 2023-06-29 15:40:05 -04:00
parent 305b70eb27
commit 3f981236e3

View File

@ -43,6 +43,8 @@ def test_converted_tja_vs_cached_fumen(id_song, tmp_path, entry_point):
# Fetch output fumen paths
paths_out = glob.glob(os.path.join(path_temp, "*.bin"))
assert paths_out, f"No bin files generated in {path_temp}"
order = "xmhne" # Ura Oni -> Oni -> Hard -> Normal -> Easy
paths_out = sorted(paths_out, key=lambda s: [order.index(c) if c in order else len(order) for c in s])
# Extract cached fumen files to working directory
path_binzip = os.path.join(path_test, "data", f"{id_song}.zip")