Changes in python/tests/test_slicing.py [d194d8c:a1bf01d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_slicing.py
rd194d8c ra1bf01d 24 24 def test_slice_start_only_no_zero(self): 25 25 regions_start = [i*1000 for i in range(1, n_slices)] 26 slice_source_at_stamps(self.source_file, regions_start, 27 output_dir = self.output_dir, create_first=True) 26 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir) 28 27 29 28 def test_slice_start_beyond_end(self): 30 29 regions_start = [i*1000 for i in range(1, n_slices)] 31 30 regions_start += [count_samples_in_file(self.source_file) + 1000] 32 slice_source_at_stamps(self.source_file, regions_start, 33 output_dir = self.output_dir, create_first=True) 31 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir) 34 32 35 33 def test_slice_start_every_blocksize(self): … … 38 36 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir, 39 37 hopsize = 200) 40 41 def test_slice_start_every_half_blocksize(self):42 hopsize = 20043 regions_start = [i*hopsize//2 for i in range(1, n_slices)]44 slice_source_at_stamps(self.source_file, regions_start,45 output_dir = self.output_dir, hopsize = 200)46 38 47 39 def tearDown(self): … … 100 92 "number of samples written different from number of original samples") 101 93 102 def test_slice_start_and_ends_with_missing_end(self):103 regions_start = [i*1000 for i in range(n_slices)]104 regions_ends = [r-1 for r in regions_start[1:]]105 slice_source_at_stamps(self.source_file, regions_start, regions_ends,106 output_dir = self.output_dir)107 written_samples = count_samples_in_directory(self.output_dir)108 original_samples = count_samples_in_file(self.source_file)109 total_files = count_files_in_directory(self.output_dir)110 assert_equal(n_slices, total_files,111 "number of slices created different from expected")112 assert_equal(written_samples, original_samples,113 "number of samples written different from number of original samples")114 115 94 def tearDown(self): 116 95 shutil.rmtree(self.output_dir) … … 155 134 regions_end = None 156 135 slice_source_at_stamps (self.source_file, regions_start, regions_end, 157 output_dir = self.output_dir , create_first=True)136 output_dir = self.output_dir) 158 137 total_files = count_files_in_directory(self.output_dir) 159 138 assert_equal(n_slices, total_files,
Note: See TracChangeset
for help on using the changeset viewer.