~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testbranch.py

  • Committer: Martin Pool
  • Date: 2005-08-26 02:31:37 UTC
  • Revision ID: mbp@sourcefrog.net-20050826023137-eb4b101cc92f9792
- ignore tags files

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
class TestAppendRevisions(InTempDir):
22
22
    """Test appending more than one revision"""
23
 
    def runTest(self):
 
23
    def test_append_revisions(self):
24
24
        from bzrlib.branch import Branch
25
25
        br = Branch(".", init=True)
26
26
        br.append_revision("rev1")
33
33
TEST_CLASSES = [
34
34
    TestAppendRevisions,
35
35
    ]
 
36
 
 
37
 
 
38
 
 
39
# TODO: rewrite this as a regular unittest, without relying on the displayed output        
 
40
#         >>> from bzrlib.commit import commit
 
41
#         >>> bzrlib.trace.silent = True
 
42
#         >>> br1 = ScratchBranch(files=['foo', 'bar'])
 
43
#         >>> br1.add('foo')
 
44
#         >>> br1.add('bar')
 
45
#         >>> commit(br1, "lala!", rev_id="REVISION-ID-1", verbose=False)
 
46
#         >>> br2 = ScratchBranch()
 
47
#         >>> br2.update_revisions(br1)
 
48
#         Added 2 texts.
 
49
#         Added 1 inventories.
 
50
#         Added 1 revisions.
 
51
#         >>> br2.revision_history()
 
52
#         [u'REVISION-ID-1']
 
53
#         >>> br2.update_revisions(br1)
 
54
#         Added 0 revisions.
 
55
#         >>> br1.text_store.total_size() == br2.text_store.total_size()
 
56
#         True