~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

Nathaniel McCallums patch for urandom friendliness on aix.

Show diffs side-by-side

added added

removed removed

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