changeset 602:cc24cc284cde pytest2

should raise RuntimeError if a lock is already there in test_readlock_acquire.
author pkumar <contactprashantat@gmail.com>
date Wed, 29 Jun 2011 16:01:47 +0530
parents f67e58bf2f3e
children 7fe35e3453a6
files MoinMoin/util/_tests/test_lock.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/_tests/test_lock.py	Wed Jun 29 15:56:40 2011 +0530
+++ b/MoinMoin/util/_tests/test_lock.py	Wed Jun 29 16:01:47 2011 +0530
@@ -165,6 +165,8 @@
         """ util.lock: ReadLock: acquire """
         lock = ReadLock(self.lock_dir)
         assert lock.acquire(0.1)
+        with pytest.raises(RuntimeError):
+            assert lock.acquire(0.1)
 
 coverage_modules = ['MoinMoin.util.lock']