~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testbranch.py

  • Committer: Robert Collins
  • Date: 2005-10-10 23:18:27 UTC
  • mfrom: (1437)
  • mto: This revision was merged to the branch mainline in revision 1438.
  • Revision ID: robertc@robertcollins.net-20051010231827-f9e2dda2e92bf565
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib.clone import copy_branch
20
20
from bzrlib.commit import commit
21
21
import bzrlib.errors as errors
22
 
from bzrlib.errors import NoSuchRevision, UnlistableBranch
 
22
from bzrlib.errors import NoSuchRevision, UnlistableBranch, NotBranchError
23
23
from bzrlib.selftest import TestCaseInTempDir
24
24
from bzrlib.trace import mutter
25
25
import bzrlib.transactions as transactions
26
 
 
 
26
from bzrlib.selftest.HTTPTestUtil import TestCaseWithWebserver
27
27
 
28
28
class TestBranch(TestCaseInTempDir):
29
29
 
140
140
                           'wibble@fofof--20050401--1928390812')
141
141
        # list should be cleared when we do a commit
142
142
        self.assertEquals(b.pending_merges(), [])
143
 
 
144
 
 
 
143
 
 
144
 
 
145
class TestRemote(TestCaseWithWebserver):
 
146
 
 
147
    def test_open_containing(self):
 
148
        self.assertRaises(NotBranchError, Branch.open_containing,
 
149
                          self.get_remote_url(''))
 
150
        self.assertRaises(NotBranchError, Branch.open_containing,
 
151
                          self.get_remote_url('g/p/q'))
 
152
        b = Branch.initialize('.')
 
153
        Branch.open_containing(self.get_remote_url(''))
 
154
        Branch.open_containing(self.get_remote_url('g/p/q'))
 
155
        
145
156
# TODO: rewrite this as a regular unittest, without relying on the displayed output        
146
157
#         >>> from bzrlib.commit import commit
147
158
#         >>> bzrlib.trace.silent = True