~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_locking.py

MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for the (un)lock interfaces on all working tree implemenations."""
18
18
 
 
19
import sys
 
20
 
19
21
from bzrlib import (
20
22
    branch,
21
23
    errors,
22
24
    lockdir,
23
25
    )
 
26
from bzrlib.tests import TestSkipped
24
27
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
25
28
 
26
29
 
105
108
 
106
109
        :param methodname: The lock method to use to establish locks.
107
110
        """
108
 
        # This write locks the local tree, and then grabs a read lock on a
109
 
        # copy, which is bogus and the test just needs to be rewritten.
 
111
        if sys.platform == "win32":
 
112
            raise TestSkipped("don't use oslocks on win32 in unix manner")
 
113
        # This helper takes a write lock on the source tree, then opens a
 
114
        # second copy and tries to grab a read lock. This works on Unix and is
 
115
        # a reasonable way to detect when the file is actually written to, but
 
116
        # it won't work (as a test) on Windows. It might be nice to instead
 
117
        # stub out the functions used to write and that way do both less work
 
118
        # and also be able to execute on Windows.
110
119
        self.thisFailsStrictLockCheck()
111
120
        # when unlocking the last lock count from tree_write_lock,
112
121
        # the tree should do a flush().