Changeset 874ed55
- Timestamp:
- Oct 8, 2009, 4:24:19 AM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- ca0a821
- Parents:
- e6b2a0c
- Location:
- tests/python
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/python/template.py
re6b2a0c r874ed55 1 1 import unittest 2 from commands import getstatusoutput 2 3 from numpy import array 3 4 … … 19 20 (msg or '%r != %r within %r places' % (first, second, places)) 20 21 22 class program_test_case(unittest.TestCase): 23 24 filename = "/dev/null" 25 progname = "UNDEFINED" 26 command = "" 27 options = "" 28 29 def getOutput(self, expected_status = 0): 30 self.command = self.progname + ' -i ' + self.filename + self.command 31 self.command += self.options 32 [self.status, self.output] = getstatusoutput(self.command) 33 if expected_status != -1: 34 assert self.status == expected_status, \ 35 "expected status was %s, got %s\nOutput was:\n%s" % \ 36 (expected_status, self.status, self.output) 37 21 38 def array_from_text_file(filename, dtype = 'float'): 22 39 return array([line.split() for line in open(filename).readlines()],
Note: See TracChangeset
for help on using the changeset viewer.