From 7280e6782f5f5ac3a666eda48e66d6c2d2537fa8 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 8 Oct 2009 21:03:35 +0200 Subject: [PATCH] tests/python/examples/aubiopitch.py: do not fail if file is missing, print out where to find it --- tests/python/examples/aubiopitch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.26.2