Changes in python/tests/test_source.py [7fd92ca:6dc211b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_source.py
r7fd92ca r6dc211b 24 24 _debug = False 25 25 26 class Test_aubio_source_test_case(object): 27 28 @parametrize('filename', list_of_sounds) 29 def test_close_file(self, filename): 26 class Test_aubio_source_test_case(TestCase): 27 28 def setUp(self): 29 if not default_test_sound: 30 skipTest(no_sounds_msg) 31 32 def test_close_file(self): 30 33 samplerate = 0 # use native samplerate 31 34 hop_size = 256 32 f = source(filename, samplerate, hop_size) 33 f.close() 34 35 @parametrize('filename', list_of_sounds) 36 def test_close_file_twice(self, filename): 35 f = source(default_test_sound, samplerate, hop_size) 36 f.close() 37 38 def test_close_file_twice(self): 37 39 samplerate = 0 # use native samplerate 38 40 hop_size = 256 39 f = source(filename, samplerate, hop_size) 40 f.close() 41 f.close() 41 f = source(default_test_sound, samplerate, hop_size) 42 f.close() 43 f.close() 44 45 def test_read_after_close(self): 46 samplerate = 0 # use native samplerate 47 hop_size = 256 48 f = source(default_test_sound, samplerate, hop_size) 49 read, frames = f() 50 f.close() 51 with assert_raises(RuntimeError): 52 read, frames = f() 53 with assert_raises(RuntimeError): 54 read, frames = f.do_multi() 55 42 56 43 57 class Test_aubio_source_read(object):
Note: See TracChangeset
for help on using the changeset viewer.