Changeset 6f27719 for python/tests
- Timestamp:
- Jan 12, 2014, 4:28:49 AM (11 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- a4ec189
- Parents:
- aee840b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_slicing.py
raee840b r6f27719 11 11 import shutil 12 12 13 n_slices = 8 14 13 15 class aubio_slicing_test_case(TestCase): 14 16 … … 18 20 19 21 def test_slice_start_only(self): 20 regions_start = [i*1000 for i in range( 100)]22 regions_start = [i*1000 for i in range(n_slices)] 21 23 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir) 22 24 23 25 def test_slice_start_only_no_zero(self): 24 regions_start = [i*1000 for i in range(1, 100)]26 regions_start = [i*1000 for i in range(1, n_slices)] 25 27 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir) 26 28 27 29 def test_slice_start_beyond_end(self): 28 regions_start = [i*1000 for i in range(1, 100)]30 regions_start = [i*1000 for i in range(1, n_slices)] 29 31 regions_start += [count_samples_in_file(self.source_file)] 30 32 regions_start += [count_samples_in_file(self.source_file) + 1000] … … 34 36 original_samples = count_samples_in_file(self.source_file) 35 37 written_samples = count_samples_in_directory(self.output_dir) 36 assert_equal( original_samples, written_samples,37 "number samples written different from number of original samples")38 assert_equal(written_samples, original_samples, 39 "number of samples written different from number of original samples") 38 40 shutil.rmtree(self.output_dir) 39 41 … … 79 81 original_samples = count_samples_in_file(self.source_file) 80 82 written_samples = count_samples_in_directory(self.output_dir) 81 assert_equal( original_samples, written_samples,82 "number samples written different from number of original samples")83 assert_equal(written_samples, original_samples, 84 "number of samples written different from number of original samples") 83 85 84 86 def tearDown(self):
Note: See TracChangeset
for help on using the changeset viewer.