~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to blackbox.py

  • Committer: Aaron Bentley
  • Date: 2006-03-18 17:14:51 UTC
  • mfrom: (0.1.98 shelf)
  • Revision ID: aaron.bentley@utoronto.ca-20060318171451-2b15a9bcf7b77d69
Merge from shelf

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    def test_shelve(self):
25
25
        self.runbzr('init')
26
26
        self.runbzr('commit -m uc --unchanged')
27
 
        self.runbzr('shelve -r 1 -m foo --all', retcode=3)
28
 
        file('foo', 'wb').write('foo')
 
27
        self.runbzr('shelve -r 1 -m foo', retcode=3)
 
28
        file('foo', '').write('foo')
29
29
        self.runbzr('add foo')
30
30
        self.runbzr('commit -m foo')
31
 
        self.runbzr('shelve -r 1 -m foo --all', retcode=0)
 
31
        self.runbzr('shelve -r 1 -m foo', retcode=0)
32
32
 
33
33
    def test_fetch_ghosts(self):
34
34
        self.runbzr('init')
70
70
        self.runbzr('branch . my_branch')
71
71
        self.runbzr('fetch-ghosts my_branch')
72
72
 
73
 
    def test_zap(self):
74
 
        self.runbzr('init source')
75
 
        self.runbzr('checkout --lightweight source checkout')
76
 
        self.runbzr('zap checkout')
77
 
        self.assertIs(False, os.path.exists('checkout'))
78
 
        self.assertIs(True, os.path.exists('source'))
79
 
 
80
 
    def test_zap_branch(self):
81
 
        self.runbzr('init source')
82
 
        self.runbzr('checkout --lightweight source checkout')
83
 
        self.runbzr('zap --branch checkout')
84
 
        self.assertIs(False, os.path.exists('checkout'))
85
 
        self.assertIs(False, os.path.exists('source'))
86
 
 
87
 
    def test_branches(self):
88
 
        self.runbzr('init source')
89
 
        self.runbzr('init source/subsource')
90
 
        self.runbzr('checkout --lightweight source checkout')
91
 
        self.runbzr('init checkout/subcheckout')
92
 
        self.runbzr('init checkout/.bzr/subcheckout')
93
 
        out = self.capture('branches')
94
 
        lines = out.split('\n')
95
 
        self.assertIs(True, 'source' in lines)
96
 
        self.assertIs(True, 'source/subsource' in lines)
97
 
        self.assertIs(True, 'checkout/subcheckout' in lines)
98
 
        self.assertIs(True, 'checkout' not in lines)
99
 
        self.assertIs(True, 'checkout/.bzr/subcheckout' not in lines)
100
 
 
101
73
def test_suite():
102
74
    return makeSuite(TestBzrTools)