/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 breezy/tests/per_foreign_vcs/test_branch.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
class ForeignBranchTests(TestCaseWithTransport):
50
50
    """Basic tests for foreign branch implementations.
51
 
    
52
 
    These tests mainly make sure that the implementation covers the required 
53
 
    bits of the API and returns reasonable values. 
 
51
 
 
52
    These tests mainly make sure that the implementation covers the required
 
53
    bits of the API and returns reasonable values.
54
54
    """
55
 
    branch_factory = None # Set to an instance of ForeignBranchFactory by scenario
 
55
    branch_factory = None  # Set to an instance of ForeignBranchFactory by scenario
56
56
 
57
57
    def make_empty_branch(self):
58
58
        return self.branch_factory.make_empty_branch(self.get_transport())
76
76
 
77
77
    def test_get_parent(self):
78
78
        """Test that getting the parent location works, and returns None."""
79
 
        # TODO: Allow this to be non-None when foreign branches add support 
 
79
        # TODO: Allow this to be non-None when foreign branches add support
80
80
        #       for storing this URL.
81
81
        branch = self.make_branch()
82
82
        self.assertIs(None, branch.get_parent())
83
83
 
84
84
    def test_get_push_location(self):
85
85
        """Test that getting the push location works, and returns None."""
86
 
        # TODO: Allow this to be non-None when foreign branches add support 
 
86
        # TODO: Allow this to be non-None when foreign branches add support
87
87
        #       for storing this URL.
88
88
        branch = self.make_branch()
89
89
        self.assertIs(None, branch.get_push_location())
114
114
        should raise UnstackableBranchFormat at the moment.
115
115
        """
116
116
        branch = self.make_branch()
117
 
        self.assertRaises(UnstackableBranchFormat, 
 
117
        self.assertRaises(UnstackableBranchFormat,
118
118
                          branch.get_stacked_on_url)
119
119
 
120
120
    def test_get_physical_lock_status(self):
131
131
class ForeignBranchFormatTests(TestCaseWithTransport):
132
132
    """Basic tests for foreign branch format objects."""
133
133
 
134
 
    branch_format = None # Set to a BranchFormat instance by adapter
 
134
    branch_format = None  # Set to a BranchFormat instance by adapter
135
135
 
136
136
    def test_initialize(self):
137
137
        """Test this format is not initializable.
138
 
        
 
138
 
139
139
        Remote branches may be initializable on their own, but none currently
140
140
        support living in .bzr/branch.
141
141
        """
142
142
        bzrdir = self.make_controldir('dir')
143
 
        self.assertRaises(IncompatibleFormat, self.branch_format.initialize, bzrdir)
 
143
        self.assertRaises(IncompatibleFormat,
 
144
                          self.branch_format.initialize, bzrdir)
144
145
 
145
146
    def test_get_format_description_type(self):
146
147
        self.assertIsInstance(self.branch_format.get_format_description(), str)