summaryrefslogtreecommitdiffstats
path: root/scripts/external_libs/lockfile-0.10.2/test/test_lockfile.py
blob: e1f4f72f2fc12e66b3af1d066e49c8a5ec7d764a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sys

import lockfile.linklockfile
import lockfile.mkdirlockfile
import lockfile.pidlockfile
import lockfile.symlinklockfile

from compliancetest import ComplianceTest
    
class TestLinkLockFile(ComplianceTest):
    class_to_test = lockfile.linklockfile.LinkLockFile

class TestSymlinkLockFile(ComplianceTest):
    class_to_test = lockfile.symlinklockfile.SymlinkLockFile

class TestMkdirLockFile(ComplianceTest):
    class_to_test = lockfile.mkdirlockfile.MkdirLockFile

class TestPIDLockFile(ComplianceTest):
    class_to_test = lockfile.pidlockfile.PIDLockFile

# Check backwards compatibility
class TestLinkFileLock(ComplianceTest):
    class_to_test = lockfile.LinkFileLock

class TestMkdirFileLock(ComplianceTest):
    class_to_test = lockfile.MkdirFileLock

try:
    import sqlite3
except ImportError:
    pass
else:
    import lockfile.sqlitelockfile
    class TestSQLiteLockFile(ComplianceTest):
        class_to_test = lockfile.sqlitelockfile.SQLiteLockFile