tests.test_lockmgr

Classes

TestLockMgrModule([methodName])

Tests which are related to the module-level functions in lockmgr.lockmgr

class tests.test_lockmgr.TestLockMgrModule(methodName='runTest')[source]

Tests which are related to the module-level functions in lockmgr.lockmgr

Tests related to the manager class lockmgr.lockmgr.LockMgr can be found in tests.test_lockmgr_class

test_getlock_clean()[source]

Locking test_getlock then checking if Locked is raised when calling it again.

test_getlock_unlock()[source]

Locking test_unlock, unlocking it, then lock/unlock again to confirm it was freed.

test_is_locked()[source]

Locking test_is_locked then testing is_locked returns True for existing locks and False for non-existent.

test_lock_expiry()[source]

Test that expired locks are correctly removed

test_lock_no_expiry()[source]

Test that locks with None timeout aren’t removed by clean_locks

test_lock_zero_expiry()[source]

Test that locks with 0 timeout aren’t removed by clean_locks