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

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

simplified examples template

  • Property mode set to 100644
File size: 584 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  options = ""
10
11  def getOutput(self, expected_status = 0):
12    self.command = self.progname + ' -i ' + self.filename + self.command
13    self.command += self.options
14    [self.status, self.output] = getstatusoutput(self.command)
15    if expected_status != -1:
16      assert self.status == expected_status, \
17        "expected status was %s, got %s\nOutput was:\n%s" % \
18        (expected_status, self.status, self.output)
Note: See TracBrowser for help on using the repository browser.