source: python/tests/test_aubio_cmd.py @ 0a8f63f

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since 0a8f63f 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
Line 
1#! /usr/bin/env python
2
3import aubio.cmd
4from nose2 import main
5from numpy.testing import TestCase
6
7class 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
19class aubio_cmd_utils(TestCase):
20
21    def test_samples2seconds(self):
22        self.assertEqual(aubio.cmd.samples2seconds(3200, 32000),
23                "0.100000\t")
24
25    def test_samples2milliseconds(self):
26        self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000),
27                "100.000000\t")
28
29    def test_samples2samples(self):
30        self.assertEqual(aubio.cmd.samples2samples(3200, 32000),
31                "3200\t")
32
33if __name__ == '__main__':
34    main()
Note: See TracBrowser for help on using the repository browser.