TestLockMgrModule

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

__init__(methodName='runTest')

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

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

Methods

Methods

test_getlock_clean()

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

test_getlock_unlock()

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

test_is_locked()

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

test_lock_expiry()

Test that expired locks are correctly removed

test_lock_no_expiry()

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

test_lock_zero_expiry()

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

Attributes

Attributes