~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Martin Pool
  • Date: 2005-09-05 08:00:35 UTC
  • Revision ID: mbp@sourcefrog.net-20050905080035-e0439293f8b6b9f9
- start splitting code for xml (de)serialization away from objects
  preparatory to supporting multiple formats by a single library

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
"""
28
28
 
29
29
import sys
30
 
import os
31
30
 
32
31
from bzrlib.selftest import TestCaseInTempDir, BzrTestBase
33
32
from bzrlib.branch import Branch
123
122
        assert file('.bzrignore', 'rb').read() == '*.blah\ngarh\n'
124
123
 
125
124
    def test_revert(self):
 
125
        import os
126
126
        self.runbzr('init')
127
127
 
128
128
        file('hello', 'wt').write('foo')
194
194
 
195
195
    def test_merge(self):
196
196
        from bzrlib.branch import Branch
 
197
        import os
197
198
        
198
199
        os.mkdir('a')
199
200
        os.chdir('a')
221
222
        #        assert a.pending_merges() == [b.last_patch()], "Assertion %s %s" \
222
223
        #        % (a.pending_merges(), b.last_patch())
223
224
 
224
 
    def test_pull(self):
225
 
        """Pull changes from one branch to another."""
226
 
        os.mkdir('a')
227
 
        os.chdir('a')
228
 
 
229
 
        self.example_branch()
230
 
        os.chdir('..')
231
 
        self.runbzr('branch a b')
232
 
        os.chdir('b')
233
 
        self.runbzr('commit -m blah --unchanged')
234
 
        os.chdir('../a')
235
 
        a = Branch('.')
236
 
        b = Branch('../b')
237
 
        assert a.revision_history() == b.revision_history()[:-1]
238
 
        self.runbzr('pull ../b')
239
 
        assert a.revision_history() == b.revision_history()
240
 
        self.runbzr('commit -m blah2 --unchanged')
241
 
        os.chdir('../b')
242
 
        self.runbzr('commit -m blah3 --unchanged')
243
 
        self.runbzr('pull ../a', retcode=1)
244
225
 
245
226
    def test_add_reports(self):
246
227
        """add command prints the names of added files."""
269
250
    def test_bzr(self):
270
251
        from os import chdir, mkdir
271
252
        from os.path import exists
 
253
        import os
272
254
 
273
255
        runbzr = self.runbzr
274
256
        backtick = self.backtick