History

[tests] avoid some imports, add missing main

Paul Brossier committed 8 years ago

Commit fc144a51 parent fedb1396 files · +10 −7Browse files

Showing the changes to python/tests (6 of 6 files). Show all

Unified · Split

6 files
  1. python/tests/test_aubio.py +1 −2
  2. python/tests/test_aubio_cmd.py +2 −2
  3. python/tests/test_aubio_cut.py +1 −1
  4. python/tests/test_cvec.py +1 −1
  5. python/tests/test_dct.py +4 −0
  6. python/tests/test_fvec.py +1 −1
python/tests/test_aubio.py+1−2
@@ -1,6 +1,5 @@
1#! /usr/bin/env python1#! /usr/bin/env python
2 2
3from unittest import main
4from numpy.testing import TestCase3from numpy.testing import TestCase
5 4
6class aubiomodule_test_case(TestCase):5class aubiomodule_test_case(TestCase):
@@ -15,5 +14,5 @@ class aubiomodule_test_case(TestCase): · 8 unmodified lines
15 self.assertEqual('0', aubio.version[0])14 self.assertEqual('0', aubio.version[0])
16 15
17if __name__ == '__main__':16if __name__ == '__main__':
17 from unittest import main
18 main()18 main()
19
python/tests/test_aubio_cmd.py+2−2
@@ -1,8 +1,7 @@
1#! /usr/bin/env python1#! /usr/bin/env python
2 2
3import aubio.cmd
4from nose2 import main
5from numpy.testing import TestCase3from numpy.testing import TestCase
4import aubio.cmd
6 5
7class aubio_cmd(TestCase):6class aubio_cmd(TestCase):
8 7
@@ -31,4 +30,5 @@ class aubio_cmd_utils(TestCase): · 22 unmodified lines
31 "3200\t")30 "3200\t")
32 31
33if __name__ == '__main__':32if __name__ == '__main__':
33 from unittest import main
34 main()34 main()
python/tests/test_aubio_cut.py+1−1
@@ -1,7 +1,6 @@
1#! /usr/bin/env python1#! /usr/bin/env python
2 2
3import aubio.cut3import aubio.cut
4from nose2 import main
5from numpy.testing import TestCase4from numpy.testing import TestCase
6 5
7class aubio_cut(TestCase):6class aubio_cut(TestCase):
@@ -13,4 +12,5 @@ class aubio_cut(TestCase): · 5 unmodified lines
13 assert self.a_parser.parse_args(['-v']).verbose12 assert self.a_parser.parse_args(['-v']).verbose
14 13
15if __name__ == '__main__':14if __name__ == '__main__':
15 from unittest import main
16 main()16 main()
python/tests/test_cvec.py+1−1
@@ -1,6 +1,5 @@
1#! /usr/bin/env python1#! /usr/bin/env python
2 2
3from unittest import main
4import numpy as np3import numpy as np
5from numpy.testing import TestCase, assert_equal4from numpy.testing import TestCase, assert_equal
6from aubio import cvec, fvec, float_type5from aubio import cvec, fvec, float_type
@@ -141,4 +140,5 @@ class aubio_cvec_wrong_norm_input(TestCase): · 134 unmodified lines
141 a.norm = np.zeros((512//2+1, 2), dtype = float_type)140 a.norm = np.zeros((512//2+1, 2), dtype = float_type)
142 141
143if __name__ == '__main__':142if __name__ == '__main__':
143 from unittest import main
144 main()144 main()
python/tests/test_dct.py+4−0
@@ -66,3 +66,7 @@ class aubio_dct(TestCase): · 65 unmodified lines
66 aubio.dct(size)66 aubio.dct(size)
67 except AssertionError:67 except AssertionError:
68 self.skipTest('creating aubio.dct with size %d did not fail' % size)68 self.skipTest('creating aubio.dct with size %d did not fail' % size)
69
70if __name__ == '__main__':
71 from unittest import main
72 main()
python/tests/test_fvec.py+1−1
@@ -1,6 +1,5 @@
1#! /usr/bin/env python1#! /usr/bin/env python
2 2
3from unittest import main
4import numpy as np3import numpy as np
5from numpy.testing import TestCase, assert_equal, assert_almost_equal4from numpy.testing import TestCase, assert_equal, assert_almost_equal
6from aubio import fvec, zero_crossing_rate, alpha_norm, min_removal5from aubio import fvec, zero_crossing_rate, alpha_norm, min_removal
@@ -148,4 +147,5 @@ class aubio_fvec_test_memory(TestCase): · 141 unmodified lines
148 del c147 del c
149 148
150if __name__ == '__main__':149if __name__ == '__main__':
150 from unittest import main
151 main()151 main()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t