tests/
: Don't halt early if there's a len(notes) mistmatch
This commit is contained in:
parent
712cdc0a14
commit
91ad789d10
@ -84,12 +84,14 @@ def test_converted_tja_vs_cached_fumen(id_song, tmp_path, entry_point):
|
||||
for i_branch in ['normal', 'advanced', 'master']:
|
||||
co_branch = co_measure[i_branch]
|
||||
ca_branch = ca_measure[i_branch]
|
||||
assert_song_property(co_branch, ca_branch, 'length', i_measure, i_branch)
|
||||
# NB: We check for branching before checking speed as fumens store speed changes even for empty branches
|
||||
if co_branch['length'] == 0:
|
||||
continue
|
||||
assert_song_property(co_branch, ca_branch, 'speed', i_measure, i_branch)
|
||||
for i_note in range(co_branch['length']):
|
||||
# NB: We could assert that len(notes) is the same for both songs, then iterate through zipped notes.
|
||||
# But, if there is a mismatched number of notes, we want to know _where_ it occurs. So, we let the
|
||||
# comparison go on using the max length of both branches until something else fails.
|
||||
for i_note in range(max([co_branch['length'], ca_branch['length']])):
|
||||
co_note = co_branch[i_note]
|
||||
ca_note = ca_branch[i_note]
|
||||
assert_song_property(co_note, ca_note, 'type', i_measure, i_branch, i_note, func=normalize_type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user