From: Paul Brossier Date: Thu, 8 Oct 2009 19:03:35 +0000 (+0200) Subject: tests/python/examples/aubiopitch.py: do not fail if file is missing, print out where... X-Git-Tag: bzr2git~148 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7280e6782f5f5ac3a666eda48e66d6c2d2537fa8;p=aubio.git tests/python/examples/aubiopitch.py: do not fail if file is missing, print out where to find it --- diff --git a/tests/python/examples/aubiopitch.py b/tests/python/examples/aubiopitch.py index 1218fb47..33dcf108 100644 --- a/tests/python/examples/aubiopitch.py +++ b/tests/python/examples/aubiopitch.py @@ -43,13 +43,18 @@ for name in mode_names: class aubiopitch_test_yinfft(program_test_case): - filename = os.path.join('..','..','sounds','16568_acclivity_TwoCows.wav') + filename = os.path.join('..','..','sounds','16568__acclivity__TwoCows.wav') + url = "http://www.freesound.org/samplesViewSingle.php?id=16568" progname = "PYTHONPATH=../../python:../../python/aubio/.libs " + \ os.path.join('..','..','python','aubiopitch') options = " -m yinfft -t 0.75 " def test_aubiopitch(self): """ test aubiopitch with default parameters """ + if not os.path.isfile(self.filename): + print "Warning: file 16568_acclivity_TwoCows.wav was not found in %s" % os.path.dirname(self.filename) + print "download it from %s to actually run test" % url + return self.getOutput() expected_output = open(os.path.join('examples','aubiopitch','yinfft'+'.'+os.path.basename(self.filename)+'.txt')).read() lines = 0