def test_control_character_rendering():
 superConsole.SendKeys('outputRedirectStart{(}{)}{ENTER}')
 testRegex = ''
 superConsole.SendKeys('print "^(d)^(d){LEFT}{DELETE}"{ENTER}')
 testRegex += chr(4)
 superConsole.SendKeys('while True: pass{ENTER}{ENTER}')
 superConsole.SendKeys('^(c)')
 print 'CodePlex Work Item 12401'
 errors = ['Traceback (most recent call last):', '  File', '  File', 'KeyboardInterrupt', '']
 superConsole.SendKeys('def foo{(}{)}:{ENTER}try:{ENTER}while True:{ENTER}pass{ENTER}')
 superConsole.SendKeys('{BACKSPACE}{BACKSPACE}except KeyboardInterrupt:{ENTER}print "caught"{ENTER}{BACKSPACE}{ENTER}')
 superConsole.SendKeys('print "after"{ENTER}{BACKSPACE}{ENTER}foo{(}{)}{ENTER}')
 sleep(2)
 superConsole.SendKeys('^(c)')
 testRegex += 'caughtafter'
 superConsole.SendKeys('outputRedirectStop{(}{)}{ENTER}')
 verifyResults(getTestOutput()[0], testRegex)
 errlines = getTestOutput()[1]
 Assert((('KeyboardInterrupt' + newline) in errlines), ('KeyboardInterrupt not found in:' + str(errlines)))

def test_control_character_rendering ( ) : superConsole . SendKeys ( 'outputRedirectStart{(}{)}{ENTER}' ) testRegex = '' superConsole . SendKeys ( 'print "^(d)^(d){LEFT}{DELETE}"{ENTER}' ) testRegex += chr ( 4 ) superConsole . SendKeys ( 'while True: pass{ENTER}{ENTER}' ) superConsole . SendKeys ( '^(c)' ) print 'CodePlex Work Item 12401' errors = [ 'Traceback (most recent call last):' , '  File' , '  File' , 'KeyboardInterrupt' , '' ] superConsole . SendKeys ( 'def foo{(}{)}:{ENTER}try:{ENTER}while True:{ENTER}pass{ENTER}' ) superConsole . SendKeys ( '{BACKSPACE}{BACKSPACE}except KeyboardInterrupt:{ENTER}print "caught"{ENTER}{BACKSPACE}{ENTER}' ) superConsole . SendKeys ( 'print "after"{ENTER}{BACKSPACE}{ENTER}foo{(}{)}{ENTER}' ) sleep ( 2 ) superConsole . SendKeys ( '^(c)' ) testRegex += 'caughtafter' superConsole . SendKeys ( 'outputRedirectStop{(}{)}{ENTER}' ) verifyResults ( getTestOutput ( ) [ 0 ] , testRegex ) errlines = getTestOutput ( ) [ 1 ] Assert ( ( ( 'KeyboardInterrupt' + newline ) in errlines ) , ( 'KeyboardInterrupt not found in:' + str ( errlines ) ) )
control-character rendering .