~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_foreign_vcs/test_branch.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
 
21
21
from bzrlib.errors import (
 
22
    IncompatibleFormat,
22
23
    UnstackableBranchFormat,
23
24
    )
24
25
from bzrlib.revision import (
25
26
    NULL_REVISION,
26
27
    )
27
28
from bzrlib.tests import (
28
 
    TestCase,
29
29
    TestCaseWithTransport,
30
30
    )
31
31
 
61
61
        branch = self.make_branch()
62
62
        branch.set_parent("foobar")
63
63
 
64
 
    def test_break_lock(self):
65
 
        """Test that break_lock() works, even if it is a no-op."""
66
 
        branch = self.make_branch()
67
 
        branch.break_lock()
68
 
 
69
64
    def test_set_push_location(self):
70
65
        """Test that setting the push location works."""
71
66
        branch = self.make_branch()
129
124
        self.assertEquals((0, NULL_REVISION), branch.last_revision_info())
130
125
 
131
126
 
132
 
class ForeignBranchFormatTests(TestCase):
 
127
class ForeignBranchFormatTests(TestCaseWithTransport):
133
128
    """Basic tests for foreign branch format objects."""
134
129
 
135
130
    branch_format = None # Set to a BranchFormat instance by adapter
140
135
        Remote branches may be initializable on their own, but none currently
141
136
        support living in .bzr/branch.
142
137
        """
143
 
        self.assertRaises(NotImplementedError, self.branch_format.initialize, None)
 
138
        bzrdir = self.make_bzrdir('dir')
 
139
        self.assertRaises(IncompatibleFormat, self.branch_format.initialize, bzrdir)
144
140
 
145
141
    def test_get_format_description_type(self):
146
142
        self.assertIsInstance(self.branch_format.get_format_description(), str)
147
143
 
148
144
    def test_network_name(self):
149
145
        self.assertIsInstance(self.branch_format.network_name(), str)
150
 
 
151