~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:
145
145
        self.runbzr('import source-0.1.tar.bz2 import4')
146
146
        self.failUnlessExists('import4/src/myfile')
147
147
 
 
148
    def test_shove(self):
 
149
        self.runbzr('init source')
 
150
        f = file('source/file', 'wb')
 
151
        f.write('hello\n')
 
152
        f.close()
 
153
        self.runbzr('add source/file')
 
154
        self.runbzr('commit source -m foo')
 
155
        self.runbzr('branch source target1')
 
156
        self.runbzr('branch source target2')
 
157
        f = file('source/file', 'wb')
 
158
        f.write('goodbye\n')
 
159
        f.close()
 
160
        self.runbzr('shove target1 source')
 
161
        f = file('target1/file', 'rb')
 
162
        self.assertEqual(f.read(), 'goodbye\n')
 
163
        f.close()
 
164
        os.chdir('source')
 
165
        self.runbzr('shove target2', retcode=3)
 
166
        self.runbzr('shove ../target2')
 
167
        f = file('../target2/file', 'rb')
 
168
        self.assertEqual(f.read(), 'goodbye\n')
 
169
        f.close()
 
170
 
148
171
def test_suite():
149
172
    return makeSuite(TestBzrTools)