feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change
on this file since 87e181d was
5eaed62,
checked in by Paul Brossier <piem@piem.org>, 7 years ago
|
python/tests/test_aubio_cmd.py: avoid unused variable
|
-
Property mode set to
100755
|
File size:
901 bytes
|
Line | |
---|
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): |
---|
13 | try: |
---|
14 | assert self.a_parser.parse_args(['-V']).show_version |
---|
15 | except SystemExit: |
---|
16 | url = 'https://bugs.python.org/issue9253' |
---|
17 | self.skipTest('subcommand became optional in py3, see %s' % url) |
---|
18 | |
---|
19 | class aubio_cmd_utils(TestCase): |
---|
20 | |
---|
21 | def test_samples2seconds(self): |
---|
22 | self.assertEqual(aubio.cmd.samples2seconds(3200, 32000), "0.100000\t") |
---|
23 | |
---|
24 | def test_samples2milliseconds(self): |
---|
25 | self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000), "100.000000\t") |
---|
26 | |
---|
27 | def test_samples2samples(self): |
---|
28 | self.assertEqual(aubio.cmd.samples2samples(3200, 32000), "3200\t") |
---|
29 | |
---|
30 | if __name__ == '__main__': |
---|
31 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.