~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-01-12 01:10:03 UTC
  • mto: This revision was merged to the branch mainline in revision 4965.
  • Revision ID: andrew.bennetts@canonical.com-20100112011003-63u5ccwhjeygp870
More tests and comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
from bzrlib.bzrdir import BzrDir
 
21
from bzrlib.bzrdir import BzrDir, BzrDirMetaFormat1
22
22
import bzrlib.errors as errors
23
23
from bzrlib.tests import TestCaseInTempDir
24
24
 
129
129
        dir.open_repository() # there is a repository there
130
130
        e = self.assertRaises(errors.NotBranchError, dir.open_branch)
131
131
        self.assertContainsRe(str(e), "location is a repository")
 
132
 
 
133
    def test_notification_on_branch_from_nonrepository(self):
 
134
        fmt = BzrDirMetaFormat1()
 
135
        t = self.get_transport()
 
136
        t.mkdir('a')
 
137
        dir = fmt.initialize_on_transport(t.clone('a'))
 
138
        self.assertRaises(errors.NoRepositoryPresent, dir.open_repository)
 
139
        e = self.assertRaises(errors.NotBranchError, dir.open_branch)
 
140
        self.assertNotContainsRe(str(e), "location is a repository")