/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 08:58:15 UTC
  • mfrom: (5609.48.2 2.3)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706085815-6leauod52jq2u43d
MergingĀ inĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
# Authors:  Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from cStringIO import StringIO
19
18
import os
20
19
 
21
20
from bzrlib import (
25
24
    transport,
26
25
    workingtree,
27
26
    )
28
 
from bzrlib.branch import Branch
29
 
from bzrlib.bzrdir import BzrDir
30
27
from bzrlib.lockdir import LockDir
31
28
from bzrlib.mutabletree import needs_tree_write_lock
32
29
from bzrlib.tests import TestCase, TestCaseWithTransport, TestSkipped
140
137
            format.initialize(dir)
141
138
            t = transport.get_transport(url)
142
139
            found_format = workingtree.WorkingTreeFormat.find_format(dir)
143
 
            self.failUnless(isinstance(found_format, format.__class__))
 
140
            self.assertIsInstance(found_format, format.__class__)
144
141
        check_format(workingtree.WorkingTreeFormat3(), "bar")
145
142
 
146
143
    def test_find_format_no_tree(self):
345
342
        self.build_tree_contents([('other/hello', 'hELLO')])
346
343
        other.commit('Case switch')
347
344
        this = base.bzrdir.sprout('this').open_workingtree()
348
 
        self.failUnlessExists('this/hello')
 
345
        self.assertPathExists('this/hello')
349
346
        self.build_tree_contents([('this/hello', 'Hello World')])
350
347
        this.commit('Add World')
351
348
        this.merge_from_branch(other.branch)
372
369
        self.assertEqual([], this.conflicts())
373
370
        self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
374
371
                         resolved)
375
 
        self.failIfExists('this/hello.BASE')
 
372
        self.assertPathDoesNotExist('this/hello.BASE')
376
373
 
377
374
    def test_auto_resolve_dir(self):
378
375
        tree = self.make_branch_and_tree('tree')