~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

  • Committer: John Arbash Meinel
  • Date: 2005-09-18 16:09:41 UTC
  • mto: (1185.1.32)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: john@arbash-meinel.com-20050918160940-ab133a1f31616576
Added test cases for handling bogus files.

Show diffs side-by-side

added added

removed removed

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