source: tests/python/examples/template.py @ 031b1f9

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 031b1f9 was 031b1f9, checked in by Paul Brossier <piem@piem.org>, 13 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.