~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-04 09:41:29 UTC
  • mfrom: (5816.3.4 serve-tariff-wt)
  • Revision ID: pqm@pqm.ubuntu.com-20110504094129-zodvq0croxdzf86w
(jelmer) Don't load working tree implementations during 'bzr serve'. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
class TestWorkingTreeFormat(TestCaseWithTransport):
167
167
    """Tests for the WorkingTreeFormat facility."""
168
168
 
 
169
    def test_find_format_string(self):
 
170
        # is the right format object found for a working tree?
 
171
        branch = self.make_branch('branch')
 
172
        self.assertRaises(errors.NoWorkingTree,
 
173
            workingtree.WorkingTreeFormat.find_format_string, branch.bzrdir)
 
174
        transport = branch.bzrdir.get_workingtree_transport(None)
 
175
        transport.mkdir('.')
 
176
        transport.put_bytes("format", "some format name")
 
177
        # The format does not have to be known by Bazaar,
 
178
        # find_format_string just retrieves the name
 
179
        self.assertEquals("some format name",
 
180
            workingtree.WorkingTreeFormat.find_format_string(branch.bzrdir))
 
181
 
169
182
    def test_find_format(self):
170
183
        # is the right format object found for a working tree?
171
184
        # create a branch with a few known format objects.