~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

  • Committer: Aaron Bentley
  • Date: 2005-09-19 02:33:09 UTC
  • mfrom: (1185.3.27)
  • mto: (1185.1.29)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050919023309-24e8871f7f8b31cf
Merged latest from mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/python
2
 
 
3
1
import os
4
2
import unittest
5
3
 
11
9
class TestBranch(TestCaseInTempDir):
12
10
 
13
11
    def test_unknowns(self):
14
 
        b = Branch('.', init=True)
 
12
        b = Branch.initialize('.')
15
13
 
16
14
        self.build_tree(['hello.txt',
17
15
                         'hello.txt~'])
22
20
    def test_no_changes(self):
23
21
        from bzrlib.errors import PointlessCommit
24
22
        
25
 
        b = Branch('.', init=True)
 
23
        b = Branch.initialize('.')
26
24
 
27
25
        self.build_tree(['hello.txt'])
28
26
 
76
74
 
77
75
    def test_pending_merges(self):
78
76
        """Tracking pending-merged revisions."""
79
 
        b = Branch('.', init=True)
 
77
        b = Branch.initialize('.')
80
78
 
81
79
        self.assertEquals(b.pending_merges(), [])
82
80
        b.add_pending_merge('foo@azkhazan-123123-abcabc')
99
97
        
100
98
    def test_revert(self):
101
99
        """Test selected-file revert"""
102
 
        b = Branch('.', init=True)
 
100
        b = Branch.initialize('.')
103
101
 
104
102
        self.build_tree(['hello.txt'])
105
103
        file('hello.txt', 'w').write('initial hello')
126
124
 
127
125
    def test_rename_dirs(self):
128
126
        """Test renaming directories and the files within them."""
129
 
        b = Branch('.', init=True)
 
127
        b = Branch.initialize('.')
130
128
        self.build_tree(['dir/', 'dir/sub/', 'dir/sub/file'])
131
129
        b.add(['dir', 'dir/sub', 'dir/sub/file'])
132
130