~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_exceptions.py

  • Committer: Martin Pool
  • Date: 2007-09-24 06:42:21 UTC
  • mfrom: (2713.2.3 error-exitcode)
  • mto: This revision was merged to the branch mainline in revision 2874.
  • Revision ID: mbp@sourcefrog.net-20070924064221-nu12try0hbilenlj
Return exitcode 4 on internal error

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from bzrlib import (
24
24
    bzrdir,
 
25
    errors,
25
26
    repository,
26
27
    trace,
27
28
    )
44
45
            r'bzr: ERROR: exceptions\.AssertionError: failed\n')
45
46
        self.assertContainsRe(err,
46
47
            r'please send this report to')
 
48
 
 
49
    def test_exception_exitcode(self):
 
50
        # we must use a subprocess, because the normal in-memory mechanism
 
51
        # allows errors to propagate up through the test suite
 
52
        self.run_bzr_subprocess(['assert-fail'],
 
53
            retcode=errors.EXIT_INTERNAL_ERROR)
 
54
 
 
55
 
 
56
    # TODO: assert-fail doesn't need to always be present; we could just
 
57
    # register (and unregister) it from tests that want to touch it.
47
58
    
48
59
 
49
60
class TestDeprecationWarning(TestCaseInTempDir):