@@ -618,11 +618,11 @@ def test_serialization(
618618 id = "spectro_only" ,
619619 ),
620620 pytest .param (
621- OutputType .SPECTROGRAM ,
621+ OutputType .SPECTRUM ,
622622 id = "spectrum_only" ,
623623 ),
624624 pytest .param (
625- OutputType .SPECTROGRAM ,
625+ OutputType .SPECTRUM | OutputType . SPECTROGRAM ,
626626 id = "both_spectral_flags" ,
627627 ),
628628 ],
@@ -1169,8 +1169,8 @@ def test_prepare_spectro(
11691169
11701170
11711171def test_edit_transform_before_run (
1172- tmp_path : pytest . fixture ,
1173- audio_files : pytest . fixture ,
1172+ tmp_path : Path ,
1173+ audio_files : None ,
11741174) -> None :
11751175 project = Project (
11761176 folder = tmp_path ,
@@ -1181,10 +1181,11 @@ def test_edit_transform_before_run(
11811181 project .build ()
11821182
11831183 transform = Transform (
1184- output_type = OutputType .AUDIO | OutputType .SPECTROGRAM ,
1184+ output_type = OutputType .AUDIO | OutputType .SPECTRUM | OutputType . SPECTROGRAM ,
11851185 data_duration = project .origin_dataset .duration / 2 ,
11861186 name = "original_transform" ,
11871187 sample_rate = 24_000 ,
1188+ v_lim = (0.0 , 120.0 ),
11881189 fft = ShortTimeFFT (win = hamming (1024 ), hop = 1024 , fs = 24_000 ),
11891190 )
11901191
@@ -1205,7 +1206,14 @@ def test_edit_transform_before_run(
12051206 ads .data = new_data
12061207 ads .normalization = new_normalization
12071208
1208- project .run (transform , audio_dataset = ads )
1209+ # Spectro edits
1210+ new_v_lim = (50.0 , 100.0 )
1211+ sds = project .prepare_spectro (transform = transform , audio_dataset = ads )
1212+ sds .v_lim = new_v_lim
1213+ for idx , sd in enumerate (sds .data ):
1214+ sd .name = str (idx )
1215+
1216+ project .run (transform , audio_dataset = ads , spectro_dataset = sds )
12091217
12101218 # New ads name
12111219 assert (project .folder / "data" / "audio" / ads .name ).exists ()
@@ -1234,6 +1242,10 @@ def test_edit_transform_before_run(
12341242 # Instrument has been edited
12351243 assert output_ads .instrument .end_to_end_db == new_instrument .end_to_end_db
12361244
1245+ # Spectro data have been edited
1246+ assert output_sds .v_lim == new_v_lim
1247+ assert all (sd .name == str (i ) for i , sd in enumerate (output_sds .data ))
1248+
12371249
12381250def test_delete_output_dataset (
12391251 tmp_path : pytest .fixture ,
0 commit comments