feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/timestretchfix/ffmpeg5
Last change
on this file since 7fc8406 was
eb6f9d3,
checked in by Paul Brossier <piem@piem.org>, 6 years ago
|
[cmd] wrap long lines in test
|
-
Property mode set to
100755
|
File size:
949 bytes
|
Rev | Line | |
---|
[799a940] | 1 | #! /usr/bin/env python |
---|
| 2 | |
---|
| 3 | import aubio.cmd |
---|
| 4 | from nose2 import main |
---|
| 5 | from numpy.testing import TestCase |
---|
| 6 | |
---|
| 7 | class aubio_cmd(TestCase): |
---|
| 8 | |
---|
| 9 | def setUp(self): |
---|
| 10 | self.a_parser = aubio.cmd.aubio_parser() |
---|
| 11 | |
---|
| 12 | def test_default_creation(self): |
---|
[f4fcf02] | 13 | try: |
---|
| 14 | assert self.a_parser.parse_args(['-V']).show_version |
---|
[5eaed62] | 15 | except SystemExit: |
---|
[f4fcf02] | 16 | url = 'https://bugs.python.org/issue9253' |
---|
| 17 | self.skipTest('subcommand became optional in py3, see %s' % url) |
---|
[799a940] | 18 | |
---|
| 19 | class aubio_cmd_utils(TestCase): |
---|
| 20 | |
---|
| 21 | def test_samples2seconds(self): |
---|
[eb6f9d3] | 22 | self.assertEqual(aubio.cmd.samples2seconds(3200, 32000), |
---|
| 23 | "0.100000\t") |
---|
[799a940] | 24 | |
---|
| 25 | def test_samples2milliseconds(self): |
---|
[eb6f9d3] | 26 | self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000), |
---|
| 27 | "100.000000\t") |
---|
[799a940] | 28 | |
---|
| 29 | def test_samples2samples(self): |
---|
[eb6f9d3] | 30 | self.assertEqual(aubio.cmd.samples2samples(3200, 32000), |
---|
| 31 | "3200\t") |
---|
[799a940] | 32 | |
---|
| 33 | if __name__ == '__main__': |
---|
| 34 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.