def test_reentrant_read(self): testLock = RWLock() testLock.reader_acquire() testLock.reader_acquire() testLock.reader_release() testLock.reader_release()
def test_overrelease_read(self): testLock = RWLock() testLock.reader_acquire() testLock.reader_release() self.assertRaises(RuntimeError, testLock.reader_release)