def test_non_reentrant_write(self): testLock = RWLock() testLock.writer_acquire() self.assertRaises(RuntimeError, testLock.writer_acquire, blocking=False) testLock.writer_release()
def test_overrelease_write(self): testLock = RWLock() testLock.writer_acquire() testLock.writer_release() self.assertRaises(RuntimeError, testLock.writer_release)