~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

  • Committer: Lalo Martins
  • Date: 2005-09-09 11:37:44 UTC
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050909113744-22f870db25a9e5f5
getting rid of everything that calls the Branch constructor directly

Show diffs side-by-side

added added

removed removed

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