~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

  • Committer: Robert Collins
  • Date: 2006-02-11 11:58:06 UTC
  • mto: (1534.1.22 integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060211115806-732dabc1e35714ed
Give format3 working trees their own last-revision marker.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
        
120
120
    def test_find_format_no_tree(self):
121
121
        dir = bzrdir.BzrDirMetaFormat1().initialize('.')
122
 
        self.assertRaises(NotBranchError,
 
122
        self.assertRaises(errors.NoWorkingTree,
123
123
                          workingtree.WorkingTreeFormat.find_format,
124
124
                          dir)
125
125
 
144
144
        workingtree.WorkingTreeFormat.register_format(format)
145
145
        # which branch.Open will refuse (not supported)
146
146
        self.assertRaises(errors.UnsupportedFormatError, workingtree.WorkingTree.open, '.')
147
 
        # compatability
148
 
        self.assertRaises(errors.UnsupportedFormatError, workingtree.WorkingTree, '.')
149
147
        # but open_downlevel will work
150
148
        self.assertEqual(format.open(dir), workingtree.WorkingTree.open_downlevel('.'))
151
149
        # unregister the format
177
175
        self.assertEqualDiff('### bzr hashcache v5\n',
178
176
                             t.get('stat-cache').read())
179
177
        self.assertFalse(t.has('inventory.basis'))
 
178
        # no last-revision file means 'None' or 'NULLREVISION'
 
179
        self.assertFalse(t.has('last-revision'))
180
180
        # TODO RBC 20060210 do a commit, check the inventory.basis is created 
181
 
        # correctly.
 
181
        # correctly and last-revision file becomes present.