Example #1
0
 def test_trim(self):
     output_file = util.temp_file(formats.WAVE)
     self.assert_(
         sox.trim(input_file=self.input_file,
                  output_file=output_file,
                  start_time=0,
                  end_time=0.1),
         "Conversion failed.")
Example #2
0
 def test_trim_inplace(self):
     another_file = util.temp_file(formats.WAVE)
     shutil.copy(self.input_file, another_file)
     self.assert_(
         sox.trim(input_file=another_file,
                  output_file=None,
                  start_time=0,
                  end_time=0.1),
         "Conversion failed.")
     self.assert_(os.path.exists(another_file))