History

python/tests/test_source.py: skip tests if no sounds were found

Paul Brossier committed 10 years ago

Commit 15a005d1 parent 85e0e761 file · +4 −1Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/tests/test_source.py+4−1
@@ -7,7 +7,7 @@ from utils import list_all_sounds · 6 unmodified lines
77 from nose2.tools import params
88
99 list_of_sounds = list_all_sounds('sounds')
10−default_test_sound = list_of_sounds[0]
10+default_test_sound = None
1111 samplerates = [0, 44100, 8000, 32000]
1212 hop_sizes = [512, 1024, 64]
1313
@@ -24,6 +24,7 @@ class aubio_source_test_case_base(TestCase): · 10 unmodified lines
2424
2525 def setUp(self):
2626 if not len(list_of_sounds): self.skipTest('add some sound files in \'python/tests/sounds\'')
27+ default_test_sound = list_of_sounds[0]
2728
2829 class aubio_source_test_case(aubio_source_test_case_base):
2930
@@ -113,6 +114,8 @@ class aubio_source_test_wrong_params(TestCase): · 83 unmodified lines
113114 with self.assertRaises(RuntimeError):
114115 f = source('path_to/unexisting file.mp3')
115116
117+class aubio_source_test_wrong_params(aubio_source_test_case_base):
118+
116119 def test_wrong_samplerate(self):
117120 with self.assertRaises(ValueError):
118121 f = source(default_test_sound, -1)

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