~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/blackbox.py

  • Committer: Aaron Bentley
  • Date: 2006-08-02 03:23:09 UTC
  • mto: This revision was merged to the branch mainline in revision 425.
  • Revision ID: aaron.bentley@utoronto.ca-20060802032309-6ad0139e61304b19
Etienne Goyer: remove unused shebangs, update packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
    def test_clean_tree(self):
10
10
        self.runbzr('init')
 
11
        self.runbzr('ignore *~')
 
12
        self.runbzr('ignore *.pyc')
11
13
        self.touch('name')
12
14
        self.touch('name~')
13
15
        assert os.path.lexists('name~')
15
17
        self.runbzr('clean-tree')
16
18
        assert os.path.lexists('name~')
17
19
        assert not os.path.lexists('name')
 
20
        self.touch('name')
18
21
        self.runbzr('clean-tree --detritus')
 
22
        assert os.path.lexists('name')
19
23
        assert not os.path.lexists('name~')
20
24
        assert os.path.lexists('name.pyc')
21
25
        self.runbzr('clean-tree --ignored')
 
26
        assert os.path.lexists('name')
 
27
        assert not os.path.lexists('name.pyc')
 
28
        self.runbzr('clean-tree --unknown')
 
29
        assert not os.path.lexists('name')
 
30
        self.touch('name')
 
31
        self.touch('name~')
 
32
        self.touch('name.pyc')
 
33
        self.runbzr('clean-tree --unknown --ignored')
 
34
        assert not os.path.lexists('name')
 
35
        assert not os.path.lexists('name~')
22
36
        assert not os.path.lexists('name.pyc')
23
37
 
24
38
    def test_shelve(self):
143
157
        f = file('source/file', 'wb')
144
158
        f.write('goodbye\n')
145
159
        f.close()
146
 
        self.runbzr('shove source target1')
 
160
        self.runbzr('shove target1 source')
147
161
        f = file('target1/file', 'rb')
148
162
        self.assertEqual(f.read(), 'goodbye\n')
149
163
        f.close()