source: tests/python/examples/template.py @ 79287252

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 79287252 was 031b1f9, checked in by Paul Brossier <piem@piem.org>, 17 years ago

added examples tests

  • Property mode set to 100644
File size: 631 bytes
Line 
1import unittest
2from commands import getstatusoutput
3
4class program_test_case(unittest.TestCase):
5
6  filename = "/dev/null"
7  progname = "UNDEFINED"
8  command = ""
9
10  def setUp(self, options = ""):
11    self.options = options
12
13  def getOutput(self, expected_status = 0):
14    self.command = self.progname + ' -i ' + self.filename + self.command
15    self.command += self.options
16    [self.status, self.output] = getstatusoutput(self.command)
17    if expected_status != -1:
18      assert self.status == expected_status, \
19        "expected status was %s, got %s\nOutput was:\n%s" % \
20        (expected_status, self.status, self.output)
Note: See TracBrowser for help on using the repository browser.