Skip to content

Commit

Permalink
made a smaller test version of maestro-v2.0.0.json only including the…
Browse files Browse the repository at this point in the history
… test files referenced, modified test_maestro_create_input_data to work with this.
  • Loading branch information
bgenchel committed Jul 30, 2024
1 parent f2f9a39 commit 415deca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/data/test_maestro.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,14 @@ def test_maestro_invalid_tracks_over_15_min(tmpdir: str) -> None:


def test_maestro_create_input_data() -> None:
"""
A commuted metadata file is included in the repo for testing. mirdata references the metadata file to
populate the tracklist with metadata. Since the file is commuted to only the filenames referenced here,
we only consider these when testing the metadata.
"""
data = create_input_data(str(MAESTRO_TEST_DATA_PATH))
assert len(data)

splits = set(map(lambda el: el[1], data))
test_fnames = {TRAIN_TRACK_ID, VALID_TRACK_ID, TEST_TRACK_ID, GT_15M_TRACK_ID}
splits = set(map(lambda el: el[1], [d for d in data if d[0].split('.')[0] in test_fnames]))
assert splits == set(["train", "validation", "test"])
2 changes: 1 addition & 1 deletion tests/resources/data/maestro/maestro-v2.0.0.json

Large diffs are not rendered by default.

0 comments on commit 415deca

Please sign in to comment.