Changeset 9668a37


Ignore:
Timestamp:
Nov 23, 2007, 1:32:13 PM (16 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
5294546
Parents:
a2f3555
Message:

examples/aubiopitch.py: also print line number and write output file if exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/python/examples/aubiopitch.py

    ra2f3555 r9668a37  
    5353    self.getOutput()
    5454    expected_output = open(os.path.join('examples','aubiopitch','yinfft'+'.'+os.path.basename(self.filename)+'.txt')).read()
     55    lines = 0
    5556    for line_out, line_exp in zip(self.output.split('\n'), expected_output.split('\n')):
    56       assert line_out == line_exp, line_exp + " vs. " + line_out
     57      try:
     58        assert line_exp == line_out, line_exp + " vs. " + line_out + " at line " + str(lines)
     59      except:
     60        open(os.path.join('examples','aubiopitch','yinfft'+'.'+os.path.basename(self.filename)+'.txt.out'),'w').write(self.output)
     61        raise
     62      lines += 1
    5763
    5864if __name__ == '__main__': unittest.main()
Note: See TracChangeset for help on using the changeset viewer.