~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2009-08-28 05:00:33 UTC
  • mfrom: (4659 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: mbp@sourcefrog.net-20090828050033-blwvnig3gdzbr1iw
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for WorkingTree.flush."""
18
18
 
 
19
import sys
19
20
from bzrlib import errors, inventory
 
21
from bzrlib.tests import TestSkipped
20
22
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
21
23
 
22
24
 
31
33
            tree.unlock()
32
34
 
33
35
    def test_flush_when_inventory_is_modified(self):
 
36
        if sys.platform == "win32":
 
37
            raise TestSkipped("don't use oslocks on win32 in unix manner")
34
38
        # This takes a write lock on the source tree, then opens a second copy
35
 
        # and tries to grab a read lock, which is a bit bogus
 
39
        # and tries to grab a read lock. This works on Unix and is a reasonable
 
40
        # way to detect when the file is actually written to, but it won't work
 
41
        # (as a test) on Windows. It might be nice to instead stub out the
 
42
        # functions used to write and that way do both less work and also be
 
43
        # able to execute on Windows.
36
44
        self.thisFailsStrictLockCheck()
37
45
        # when doing a flush the inventory should be written if needed.
38
46
        # we test that by changing the inventory (using