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 (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 @@
11 #! /usr/bin/env python
22
3−from unittest import main
43 from numpy.testing import TestCase
54
65 class aubiomodule_test_case(TestCase):
@@ -15,5 +14,5 @@ class aubiomodule_test_case(TestCase): · 8 unmodified lines
1514 self.assertEqual('0', aubio.version[0])
1615
1716 if __name__ == '__main__':
17+ from unittest import main
1818 main()
19−
python/tests/test_aubio_cmd.py+2−2
@@ -1,8 +1,7 @@
11 #! /usr/bin/env python
22
3−import aubio.cmd
4−from nose2 import main
53 from numpy.testing import TestCase
4+import aubio.cmd
65
76 class aubio_cmd(TestCase):
87
@@ -31,4 +30,5 @@ class aubio_cmd_utils(TestCase): · 22 unmodified lines
3130 "3200\t")
3231
3332 if __name__ == '__main__':
33+ from unittest import main
3434 main()
python/tests/test_aubio_cut.py+1−1
@@ -1,7 +1,6 @@
11 #! /usr/bin/env python
22
33 import aubio.cut
4−from nose2 import main
54 from numpy.testing import TestCase
65
76 class aubio_cut(TestCase):
@@ -13,4 +12,5 @@ class aubio_cut(TestCase): · 5 unmodified lines
1312 assert self.a_parser.parse_args(['-v']).verbose
1413
1514 if __name__ == '__main__':
15+ from unittest import main
1616 main()
python/tests/test_cvec.py+1−1
@@ -1,6 +1,5 @@
11 #! /usr/bin/env python
22
3−from unittest import main
43 import numpy as np
54 from numpy.testing import TestCase, assert_equal
65 from aubio import cvec, fvec, float_type
@@ -141,4 +140,5 @@ class aubio_cvec_wrong_norm_input(TestCase): · 134 unmodified lines
141140 a.norm = np.zeros((512//2+1, 2), dtype = float_type)
142141
143142 if __name__ == '__main__':
143+ from unittest import main
144144 main()
python/tests/test_dct.py+4−0
@@ -66,3 +66,7 @@ class aubio_dct(TestCase): · 65 unmodified lines
6666 aubio.dct(size)
6767 except AssertionError:
6868 self.skipTest('creating aubio.dct with size %d did not fail' % size)
69+
70+if __name__ == '__main__':
71+ from unittest import main
72+ main()
python/tests/test_fvec.py+1−1
@@ -1,6 +1,5 @@
11 #! /usr/bin/env python
22
3−from unittest import main
43 import numpy as np
54 from numpy.testing import TestCase, assert_equal, assert_almost_equal
65 from aubio import fvec, zero_crossing_rate, alpha_norm, min_removal
@@ -148,4 +147,5 @@ class aubio_fvec_test_memory(TestCase): · 141 unmodified lines
148147 del c
149148
150149 if __name__ == '__main__':
150+ from unittest import main
151151 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