~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_shared_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
from bzrlib import osutils
22
21
from bzrlib.bzrdir import BzrDir, BzrDirMetaFormat1
23
22
import bzrlib.errors as errors
24
23
from bzrlib.tests import TestCaseInTempDir
 
24
from bzrlib.tests.matchers import ContainsNoVfsCalls
 
25
 
25
26
 
26
27
class TestSharedRepo(TestCaseInTempDir):
27
28
 
80
81
    def test_branch_tree(self):
81
82
        self.run_bzr("init-repo --trees a")
82
83
        self.run_bzr("init --format=default b")
83
 
        file('b/hello', 'wt').write('bar')
 
84
        with file('b/hello', 'wt') as f: f.write('bar')
84
85
        self.run_bzr("add b/hello")
85
86
        self.run_bzr("commit -m bar b/hello")
86
87
 
120
121
        # being too low. If rpc_count increases, more network roundtrips have
121
122
        # become necessary for this use case. Please do not adjust this number
122
123
        # upwards without agreement from bzr's network support maintainers.
123
 
        self.assertLength(15, self.hpss_calls)
 
124
        self.assertLength(11, self.hpss_calls)
 
125
        self.assertLength(1, self.hpss_connections)
 
126
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
124
127
 
125
128
    def test_notification_on_branch_from_repository(self):
126
129
        out, err = self.run_bzr("init-repository -q a")