def test_cp12403():
 superConsole.SendKeys('outputRedirectStart{(}{)}{ENTER}')
 superConsole.SendKeys('raise Exception{(}"Some string exception"{)}{ENTER}')
 expected = ['Traceback (most recent call last):', '  File "<stdin>", line 1, in <module>', 'Exception: Some string exception', '']
 superConsole.SendKeys('outputRedirectStop{(}{)}{ENTER}')
 AreEqual(removePrompts(getTestOutput()[0]), [])
 errlines = getTestOutput()[1]
 for i in xrange(len(errlines)):
  Assert(errlines[i].startswith(expected[i]), ((str(errlines) + ' != ') + str(expected)))

def test_cp12403 ( ) : superConsole . SendKeys ( 'outputRedirectStart{(}{)}{ENTER}' ) superConsole . SendKeys ( 'raise Exception{(}"Some string exception"{)}{ENTER}' ) expected = [ 'Traceback (most recent call last):' , '  File "<stdin>", line 1, in <module>' , 'Exception: Some string exception' , '' ] superConsole . SendKeys ( 'outputRedirectStop{(}{)}{ENTER}' ) AreEqual ( removePrompts ( getTestOutput ( ) [ 0 ] ) , [ ] ) errlines = getTestOutput ( ) [ 1 ] for i in xrange ( len ( errlines ) ) : Assert ( errlines [ i ] . startswith ( expected [ i ] ) , ( ( str ( errlines ) + ' != ' ) + str ( expected ) ) )
an exception thrown should appear in stderr .