@mock_streams('stderr')
@with_patched_object(output, 'aborts', True)
def test_abort_message():
 try:
  abort('Test')
 except SystemExit:
  pass
 result = sys.stderr.getvalue()
 eq_('\nFatal error: Test\n\nAborting.\n', result)

@ mock_streams ( 'stderr' ) @ with_patched_object ( output , 'aborts' , True ) def test_abort_message ( ) : try : abort ( 'Test' ) except SystemExit : pass result = sys . stderr . getvalue ( ) eq_ ( '\nFatal error: Test\n\nAborting.\n' , result )
abort() should print fatal error plus exception value .