ref: d194d8ca7f847d33bb9b1cb9eb2ead1e2c203c1e
parent: c9c012e61e07a5e4b1fe44e70bab45dc34ff7d5a
author: Paul Brossier <piem@piem.org>
date: Mon Oct 29 11:32:55 EDT 2018
[py] [slicing] add check_first=True to tests
--- a/python/tests/test_slicing.py
+++ b/python/tests/test_slicing.py
@@ -23,12 +23,14 @@
def test_slice_start_only_no_zero(self):
regions_start = [i*1000 for i in range(1, n_slices)]
- slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir)
+ slice_source_at_stamps(self.source_file, regions_start,
+ output_dir = self.output_dir, create_first=True)
def test_slice_start_beyond_end(self):
regions_start = [i*1000 for i in range(1, n_slices)]
regions_start += [count_samples_in_file(self.source_file) + 1000]
- slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir)
+ slice_source_at_stamps(self.source_file, regions_start,
+ output_dir = self.output_dir, create_first=True)
def test_slice_start_every_blocksize(self):
hopsize = 200
@@ -152,7 +154,7 @@
regions_start = [i*1000 for i in range(1, n_slices)]
regions_end = None
slice_source_at_stamps (self.source_file, regions_start, regions_end,
- output_dir = self.output_dir)
+ output_dir = self.output_dir, create_first=True)
total_files = count_files_in_directory(self.output_dir)
assert_equal(n_slices, total_files,
"number of slices created different from expected")