Skip to content

Commit

Permalink
update one track test paths for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Sep 28, 2023
1 parent 065fff2 commit 01cdac0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/test_bpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


def test_bpe_conversion(
data_path: Union[str, Path, PurePath] = "./tests/Maestro_MIDIs"
data_path: Union[str, Path, PurePath] = "./tests/One_track_MIDIs"
):
r"""Reads a few MIDI files, convert them into token sequences, convert them back to MIDI files.
The converted back MIDI files should identical to original one, expect with note starting and ending
Expand Down
2 changes: 1 addition & 1 deletion tests/test_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_convert_tensors():
"""def time_data_augmentation_tokens_vs_mid():
from time import time
tokenizers = [miditok.TSD(), miditok.REMI()]
data_paths = [Path('./tests/Maestro_MIDIs'), Path('./tests/Multitrack_MIDIs')]
data_paths = [Path('./tests/One_track_MIDIs'), Path('./tests/Multitrack_MIDIs')]
for data_path in data_paths:
for tokenizer in tokenizers:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pytorch_data_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_dataset_ram():
multitrack_midis_paths = list(Path("tests", "Multitrack_MIDIs").glob("**/*.mid"))[
:3
]
one_track_midis_paths = list(Path("tests", "Maestro_MIDIs").glob("**/*.mid"))[:3]
one_track_midis_paths = list(Path("tests", "One_track_MIDIs").glob("**/*.mid"))[:3]
tokens_os_dir = Path("tests", "multitrack_tokens_os")

# MIDI + One token stream
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


def test_merge_tracks():
midi = MidiFile(Path("tests", "Maestro_MIDIs", "Maestro_1.mid"))
midi = MidiFile(Path("tests", "One_track_MIDIs", "Maestro_1.mid"))
original_track = deepcopy(midi.instruments[0])
midi.instruments.append(deepcopy(midi.instruments[0]))
merge_tracks(midi.instruments)
Expand Down Expand Up @@ -68,7 +68,7 @@ def test_merge_same_program_tracks_and_by_class():
def test_nb_pos():
tokenizer = REMI()
_ = nb_bar_pos(
tokenizer(Path("tests", "Maestro_MIDIs", "Maestro_1.mid"))[0].ids,
tokenizer(Path("tests", "One_track_MIDIs", "Maestro_1.mid"))[0].ids,
tokenizer["Bar_None"],
tokenizer.token_ids_of_type("Position"),
)
Expand Down

0 comments on commit 01cdac0

Please sign in to comment.