~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/tree_implementations/test_tree.py

  • Committer: Ian Clatworthy
  • Date: 2008-07-18 15:00:08 UTC
  • mto: (4171.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 4173.
  • Revision ID: ian.clatworthy@canonical.com-20080718150008-mjjaa5c60kncqd80
access rules via get_special_file to fix recursion bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
        finally:
161
161
            tree.unlock()
162
162
 
 
163
    def test_get_special_file(self):
 
164
        work_tree = self.make_branch_and_tree('wt')
 
165
        tree = self.get_tree_no_parents_special_content(work_tree)
 
166
        tree.lock_read()
 
167
        self.addCleanup(tree.unlock)
 
168
        # Test lookup of existing special file
 
169
        lines = tree.get_special_file('xyz').readlines()
 
170
        self.assertEqual(['contents of .bzrxyz\n'], lines)
 
171
        # Test lookup of missing special file
 
172
        special = tree.get_special_file('a')
 
173
        self.assertEqual(None, special)
 
174
 
163
175
 
164
176
class TestExtractFilesBytes(TestCaseWithTree):
165
177