~abentley/thekraken/trunk

« back to all changes in this revision

Viewing changes to the_kraken/tests.py

  • Committer: Aaron Bentley
  • Date: 2011-01-26 05:07:18 UTC
  • Revision ID: aaron@aaronbentley.com-20110126050718-99x5uh1epka30r42
Add support for check_script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
            kraken.version = '0.99'
357
357
            kraken.check('foo', lpb)
358
358
 
 
359
    def test_check_script(self):
 
360
        with temp_dir() as server:
 
361
            bzr_branch = self.make_branch('.')
 
362
            kraken = self.make_the_kraken(bzr_branch.base)
 
363
            kraken.check_script = 'python -c "import sys; sys.exit(1)"'
 
364
            lpb = kraken.get_branch()
 
365
            with expected_exception(UserError, '.*exited with status 1'):
 
366
                kraken.check('1.0.1', lpb)
 
367
            kraken.check_script = 'python -c "import sys; sys.exit(0)"'
 
368
            kraken.check('1.0.1', lpb)
 
369
 
359
370
    def test_write_tarball(self):
360
371
        with temp_dir():
361
372
            self.make_branch('.')