~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/blackbox.py

  • Committer: Aaron Bentley
  • Date: 2011-04-26 22:54:07 UTC
  • Revision ID: aaron@aaronbentley.com-20110426225407-3vhag292qui1n98f
Eschew failIfExists/failUnlessExists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
        checkout.add('file')
89
89
        self.run_bzr_error(('This checkout has uncommitted changes',),
90
90
                           'zap checkout')
91
 
        self.failUnlessExists('checkout')
 
91
        self.assertPathExists('checkout')
92
92
        self.run_bzr('zap checkout --force')
93
 
        self.failIfExists('checkout')
94
 
        self.failUnlessExists('source')
 
93
        self.assertPathDoesNotExist('checkout')
 
94
        self.assertPathExists('source')
95
95
 
96
96
    def test_zap_branch(self):
97
97
        self.run_bzr('init source')
133
133
        self.run_bzr('init ../import')
134
134
        os.chdir('../import')
135
135
        self.run_bzr('import ../source-0.1.tar.gz')
136
 
        self.failUnlessExists('src/myfile')
 
136
        self.assertPathExists('src/myfile')
137
137
        result = self.run_bzr('import ../source-0.1.tar.gz', retcode=3)[1]
138
138
        self.assertContainsRe(result, 'Working tree has uncommitted changes')
139
139
        self.run_bzr('commit -m commit')
141
141
        os.chdir('..')
142
142
        self.run_bzr('init import2')
143
143
        self.run_bzr('import source-0.1.tar.gz import2')
144
 
        self.failUnlessExists('import2/src/myfile')
 
144
        self.assertPathExists('import2/src/myfile')
145
145
        self.run_bzr('import source-0.1.tar.gz import3')
146
 
        self.failUnlessExists('import3/src/myfile')
 
146
        self.assertPathExists('import3/src/myfile')
147
147
        self.run_bzr('import source-0.1.tar.bz2 import4')
148
 
        self.failUnlessExists('import4/src/myfile')
 
148
        self.assertPathExists('import4/src/myfile')
149
149
        self.run_bzr('import source-0.1 import5')
150
 
        self.failUnlessExists('import5/src/myfile')
 
150
        self.assertPathExists('import5/src/myfile')
151
151
 
152
152
    def test_cbranch(self):
153
153
        source = self.make_branch_and_tree('source')