~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import time
22
22
 
23
23
from bzrlib import (
 
24
    errors,
24
25
    hashcache,
25
26
    tests,
26
27
    )
27
28
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
28
29
 
29
 
from bzrlib.workingtree import InventoryWorkingTree
30
 
 
31
30
 
32
31
class TestReadonly(TestCaseWithWorkingTree):
33
32
 
79
78
        """Even if the tree is unclean, we should still handle readonly dirs."""
80
79
        # First create a tree
81
80
        tree = self.create_basic_tree()
82
 
        if not isinstance(tree, InventoryWorkingTree):
83
 
            raise tests.TestNotApplicable("requires inventory working tree")
84
81
 
85
82
        # XXX: *Ugly* *ugly* hack, we need the hashcache to think it is out of
86
83
        # date, but we don't want to actually wait 3 seconds doing nothing.
109
106
            if hack_dirstate:
110
107
                tree._dirstate._sha_cutoff_time = self._custom_cutoff_time
111
108
            # Make sure we check all the files
112
 
            for file_id in tree.all_file_ids():
 
109
            for file_id in tree:
113
110
                size = tree.get_file_size(file_id)
114
111
                sha1 = tree.get_file_sha1(file_id)
115
112
        finally: