Changeset 1c565c0 for python/tests/test_source.py
- Timestamp:
- Dec 21, 2018, 8:06:24 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 4cb2d54, 6245b52
- Parents:
- cf4bc9f (diff), 131d1eb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_source.py
rcf4bc9f r1c565c0 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.