/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/blackbox/test_switch.py

  • Committer: Breezy landing bot
  • Author(s): Gustav Hartvigsson
  • Date: 2021-01-10 18:46:30 UTC
  • mfrom: (7526.1.1 brz-removed-api-doc)
  • mto: This revision was merged to the branch mainline in revision 7532.
  • Revision ID: breezy.the.bot@gmail.com-20210110184630-dxu0g9dqq020uiw6
Drop documentation for removed API API.

Merged from https://code.launchpad.net/~gustav-hartvigsson/brz/removed-api-doc/+merge/396033

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from breezy.tests.features import UnicodeFilenameFeature
35
35
from breezy.directory_service import directories
36
36
 
37
 
from breezy.tests.matchers import ContainsNoVfsCalls
38
 
 
39
37
 
40
38
class TestSwitch(TestCaseWithTransport):
41
39
 
207
205
        self.run_bzr(['switch', '-b', 'anotherbranch'])
208
206
        self.assertEqual(
209
207
            {'', 'anotherbranch'},
210
 
            set(tree.branch.controldir.get_branches().keys()))
 
208
            set(tree.branch.controldir.branch_names()))
211
209
 
212
210
    def test_switch_into_unrelated_colocated(self):
213
211
        # Create a new colocated branch from an existing non-colocated branch.
476
474
        self.assertEqual(1, opened.count('master'))
477
475
 
478
476
 
479
 
class TestSmartServerSwitch(TestCaseWithTransport):
480
 
 
481
 
    def test_switch_lightweight(self):
482
 
        self.setup_smart_server_with_call_log()
483
 
        t = self.make_branch_and_tree('from')
484
 
        for count in range(9):
485
 
            t.commit(message='commit %d' % count)
486
 
        out, err = self.run_bzr(['checkout', '--lightweight', self.get_url('from'),
487
 
                                 'target'])
488
 
        self.reset_smart_call_log()
489
 
        self.run_bzr(['switch', self.get_url('from')], working_dir='target')
490
 
        # This figure represent the amount of work to perform this use case. It
491
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
492
 
        # being too low. If rpc_count increases, more network roundtrips have
493
 
        # become necessary for this use case. Please do not adjust this number
494
 
        # upwards without agreement from bzr's network support maintainers.
495
 
        self.assertLength(21, self.hpss_calls)
496
 
        self.assertLength(3, self.hpss_connections)
497
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
498
 
 
499
 
 
500
477
class TestSwitchUncommitted(TestCaseWithTransport):
501
478
 
502
479
    def prepare(self):