Changeset 8797138


Ignore:
Timestamp:
Dec 21, 2018, 4:22:27 PM (5 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/timestretch, master
Children:
6200052
Parents:
37c7e61
Message:

[tests] check reading source after close raises RuntimeError?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_source.py

    r37c7e61 r8797138  
    4040        f.close()
    4141        f.close()
     42
     43    @parametrize('filename', [default_test_sound])
     44    def test_read_after_close(self, filename):
     45        samplerate = 0 # use native samplerate
     46        hop_size = 256
     47        f = source(filename, samplerate, hop_size)
     48        read, frames = f()
     49        f.close()
     50        with assert_raises(RuntimeError):
     51            read, frames = f()
     52        with assert_raises(RuntimeError):
     53            read, frames = f.do_multi()
     54
    4255
    4356class Test_aubio_source_read(object):
Note: See TracChangeset for help on using the changeset viewer.