33
|
1 import sys
|
|
2
|
|
3 import lockfile.linklockfile
|
|
4 import lockfile.mkdirlockfile
|
|
5 import lockfile.pidlockfile
|
|
6 import lockfile.symlinklockfile
|
|
7
|
|
8 from compliancetest import ComplianceTest
|
|
9
|
|
10 class TestLinkLockFile(ComplianceTest):
|
|
11 class_to_test = lockfile.linklockfile.LinkLockFile
|
|
12
|
|
13 class TestSymlinkLockFile(ComplianceTest):
|
|
14 class_to_test = lockfile.symlinklockfile.SymlinkLockFile
|
|
15
|
|
16 class TestMkdirLockFile(ComplianceTest):
|
|
17 class_to_test = lockfile.mkdirlockfile.MkdirLockFile
|
|
18
|
|
19 class TestPIDLockFile(ComplianceTest):
|
|
20 class_to_test = lockfile.pidlockfile.PIDLockFile
|
|
21
|
|
22 # Check backwards compatibility
|
|
23 class TestLinkFileLock(ComplianceTest):
|
|
24 class_to_test = lockfile.LinkFileLock
|
|
25
|
|
26 class TestMkdirFileLock(ComplianceTest):
|
|
27 class_to_test = lockfile.MkdirFileLock
|
|
28
|
|
29 try:
|
|
30 import sqlite3
|
|
31 except ImportError:
|
|
32 pass
|
|
33 else:
|
|
34 import lockfile.sqlitelockfile
|
|
35 class TestSQLiteLockFile(ComplianceTest):
|
|
36 class_to_test = lockfile.sqlitelockfile.SQLiteLockFile
|