<s> import unittest <EOL> from collections import namedtuple <EOL> import sublime <EOL> from Vintageous import state <EOL> from Vintageous . vi . utils import modes <EOL> from Vintageous . vi . utils import translate_char <EOL> from Vintageous . tests import set_text <EOL> from Vintageous . tests import add_sel <EOL> from Vintageous . tests import make_region <EOL> from Vintageous . tests import ViewTest <EOL> from Vintageous . tests import ViewTest <EOL> from Vintageous . vi . keys import to_bare_command_name <EOL> from Vintageous . vi . keys import KeySequenceTokenizer <EOL> from Vintageous . vi . keys import seqs <EOL> from Vintageous . vi import variables <EOL> _tests_tokenizer = ( <EOL> ( '<STR_LIT:p>' , '<STR_LIT:p>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:P>' , '<STR_LIT:P>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:0>' , '<STR_LIT:0>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:\\>' , '<STR_LIT>' ) , <EOL> ) <EOL> class Test_KeySequenceTokenizer_tokenize_one ( ViewTest ) : <EOL> def setUp ( self ) : <EOL> super ( ) . setUp ( ) <EOL> self . old_vars = variables . _VARIABLES <EOL> variables . _VARIABLES = { } <EOL> def parse ( self , input_ ) : <EOL> tokenizer = KeySequenceTokenizer ( input_ ) <EOL> return tokenizer . tokenize_one ( ) <EOL> def testAll ( self ) : <EOL> for ( i , t ) in enumerate ( _tests_tokenizer ) : <EOL> input_ , expected , msg = t <EOL> self . assertEqual ( self . parse ( input_ ) , expected , "<STR_LIT>" . format ( i , msg ) ) <EOL> def tearDown ( self ) : <EOL> super ( ) . tearDown ( ) <EOL> variables . _VARIABLES = self . old_vars <EOL> _tests_iter_tokenize = ( <EOL> ( '<STR_LIT>' , [ '<STR_LIT:p>' , '<STR_LIT:p>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT:x>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT:a>' , '<STR_LIT:i>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' , '<STR_LIT:.>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT:0>' , '<STR_LIT>' ] , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , [ '<STR_LIT>' ] , '<STR_LIT>' ) , <EOL> ) <EOL> class Test_KeySequenceTokenizer_iter_tokenize ( ViewTest ) : <EOL> def parse ( self , input_ ) : <EOL> tokenizer = KeySequenceTokenizer ( input_ ) <EOL> return list ( tokenizer . iter_tokenize ( ) ) <EOL> def testAll ( self ) : <EOL> for ( i , t ) in enumerate ( _tests_iter_tokenize ) : <EOL> input_ , expected , msg = t <EOL> self . assertEqual ( self . parse ( input_ ) , expected , "<STR_LIT>" . format ( i , msg ) ) <EOL> _command_name_tests = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:0>' , '<STR_LIT:0>' , '<STR_LIT>' ) , <EOL> ) <EOL> class Test_to_bare_command_name ( ViewTest ) : <EOL> def transform ( self , input_ ) : <EOL> return to_bare_command_name ( input_ ) <EOL> def testAll ( self ) : <EOL> for ( i , t ) in enumerate ( _command_name_tests ) : <EOL> input_ , expected , msg = t <EOL> self . assertEqual ( self . transform ( input_ ) , expected , "<STR_LIT>" . format ( i , msg ) ) <EOL> _tranlation_tests = ( <EOL> ( '<STR_LIT>' , '<STR_LIT:\n>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:\n>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:U+0020>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:U+0020>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:<>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:a>' , '<STR_LIT:a>' , '<STR_LIT>' ) , <EOL> ) <EOL> class Test_translate_char ( ViewTest ) : <EOL> def testAll ( self ) : <EOL> for ( i , t ) in enumerate ( _tranlation_tests ) : <EOL> input_ , expected , msg = t <EOL> self . assertEqual ( translate_char ( input_ ) , expected , "<STR_LIT>" . format ( i , msg ) ) <EOL> seq_test = namedtuple ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> TESTS_KNOWN_SEQUENCES = ( <EOL> seq_test ( actual = seqs . A , expected = '<STR_LIT:a>' ) , <EOL> seq_test ( actual = seqs . ALT_CTRL_P , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . AMPERSAND , expected = '<STR_LIT:&>' ) , <EOL> seq_test ( actual = seqs . AW , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . B , expected = '<STR_LIT:b>' ) , <EOL> seq_test ( actual = seqs . BACKSPACE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_E , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . UP , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . DOWN , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . LEFT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . RIGHT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . HOME , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . END , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BACKTICK , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_A , expected = '<STR_LIT:A>' ) , <EOL> seq_test ( actual = seqs . SPACE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_B , expected = '<STR_LIT:B>' ) , <EOL> seq_test ( actual = seqs . CTRL_E , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_Y , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_C , expected = '<STR_LIT:C>' ) , <EOL> seq_test ( actual = seqs . BIG_D , expected = '<STR_LIT:D>' ) , <EOL> seq_test ( actual = seqs . GH , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_H , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_E , expected = '<STR_LIT:E>' ) , <EOL> seq_test ( actual = seqs . BIG_F , expected = '<STR_LIT:F>' ) , <EOL> seq_test ( actual = seqs . BIG_G , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_0 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_1 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_2 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_3 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_4 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_5 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_6 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_7 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_8 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_9 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_C , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_ENTER , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_SHIFT_B , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_SHIFT_ENTER , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_DOT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_SHIFT_DOT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_LEFT_SQUARE_BRACKET , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_W , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_W_Q , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_W_V , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_W_L , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_W_BIG_L , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_K , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_K_CTRL_B , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_BIG_F , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_BIG_P , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_W_H , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . Q , expected = '<STR_LIT:q>' ) , <EOL> seq_test ( actual = seqs . AT , expected = '<STR_LIT:@>' ) , <EOL> seq_test ( actual = seqs . CTRL_W_BIG_H , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_H , expected = '<STR_LIT:H>' ) , <EOL> seq_test ( actual = seqs . G_BIG_J , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_R , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_R_EQUAL , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_A , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_I , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_O , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_X , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_X_CTRL_L , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . Z , expected = '<STR_LIT:z>' ) , <EOL> seq_test ( actual = seqs . Z_ENTER , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . ZT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . ZZ , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . Z_MINUS , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . ZB , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_I , expected = '<STR_LIT:I>' ) , <EOL> seq_test ( actual = seqs . BIG_Z_BIG_Z , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_Z_BIG_Q , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GV , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_J , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_K , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_L , expected = '<STR_LIT:L>' ) , <EOL> seq_test ( actual = seqs . BIG_M , expected = '<STR_LIT:M>' ) , <EOL> seq_test ( actual = seqs . BIG_N , expected = '<STR_LIT:N>' ) , <EOL> seq_test ( actual = seqs . BIG_O , expected = '<STR_LIT:O>' ) , <EOL> seq_test ( actual = seqs . BIG_P , expected = '<STR_LIT:P>' ) , <EOL> seq_test ( actual = seqs . BIG_Q , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_R , expected = '<STR_LIT:R>' ) , <EOL> seq_test ( actual = seqs . BIG_S , expected = '<STR_LIT:S>' ) , <EOL> seq_test ( actual = seqs . BIG_T , expected = '<STR_LIT:T>' ) , <EOL> seq_test ( actual = seqs . BIG_U , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_V , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_W , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . BIG_X , expected = '<STR_LIT:X>' ) , <EOL> seq_test ( actual = seqs . BIG_Y , expected = '<STR_LIT:Y>' ) , <EOL> seq_test ( actual = seqs . BIG_Z , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . C , expected = '<STR_LIT:c>' ) , <EOL> seq_test ( actual = seqs . CC , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . COLON , expected = '<STR_LIT::>' ) , <EOL> seq_test ( actual = seqs . COMMA , expected = '<STR_LIT:U+002C>' ) , <EOL> seq_test ( actual = seqs . CTRL_D , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_F12 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_L , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_B , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_F , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_G , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_P , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_U , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_V , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . D , expected = '<STR_LIT:d>' ) , <EOL> seq_test ( actual = seqs . DD , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . DOLLAR , expected = '<STR_LIT:$>' ) , <EOL> seq_test ( actual = seqs . DOT , expected = '<STR_LIT:.>' ) , <EOL> seq_test ( actual = seqs . DOUBLE_QUOTE , expected = '<STR_LIT:">' ) , <EOL> seq_test ( actual = seqs . E , expected = '<STR_LIT:e>' ) , <EOL> seq_test ( actual = seqs . ENTER , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . SHIFT_ENTER , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . EQUAL , expected = '<STR_LIT:=>' ) , <EOL> seq_test ( actual = seqs . EQUAL_EQUAL , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . ESC , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F , expected = '<STR_LIT:f>' ) , <EOL> seq_test ( actual = seqs . F1 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F10 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F11 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F12 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F13 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F14 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F15 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F2 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F3 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . SHIFT_F2 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . SHIFT_F3 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . SHIFT_F4 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F4 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F5 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F6 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F7 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F8 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . F9 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_F2 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . CTRL_SHIFT_F2 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G , expected = '<STR_LIT:g>' ) , <EOL> seq_test ( actual = seqs . G_BIG_C , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_D , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_U , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_U_BIG_U , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_U_G_BIG_U , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_TILDE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_TILDE_G_TILDE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_TILDE_TILDE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_UNDERSCORE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GC , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GCC , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GD , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GG , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GJ , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GK , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GQ , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . G_BIG_T , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GM , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GU , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GUGU , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GUU , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . GREATER_THAN , expected = '<STR_LIT:>>' ) , <EOL> seq_test ( actual = seqs . GREATER_THAN_GREATER_THAN , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . H , expected = '<STR_LIT:h>' ) , <EOL> seq_test ( actual = seqs . HAT , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . I , expected = '<STR_LIT:i>' ) , <EOL> seq_test ( actual = seqs . J , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . K , expected = '<STR_LIT:k>' ) , <EOL> seq_test ( actual = seqs . L , expected = '<STR_LIT:l>' ) , <EOL> seq_test ( actual = seqs . LEFT_BRACE , expected = '<STR_LIT:{>' ) , <EOL> seq_test ( actual = seqs . LEFT_SQUARE_BRACKET , expected = '<STR_LIT:[>' ) , <EOL> seq_test ( actual = seqs . LEFT_PAREN , expected = '<STR_LIT:(>' ) , <EOL> seq_test ( actual = seqs . LESS_THAN , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . LESS_THAN_LESS_THAN , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . MINUS , expected = '<STR_LIT:->' ) , <EOL> seq_test ( actual = seqs . M , expected = '<STR_LIT:m>' ) , <EOL> seq_test ( actual = seqs . N , expected = '<STR_LIT:n>' ) , <EOL> seq_test ( actual = seqs . O , expected = '<STR_LIT:o>' ) , <EOL> seq_test ( actual = seqs . P , expected = '<STR_LIT:p>' ) , <EOL> seq_test ( actual = seqs . PLUS , expected = '<STR_LIT:+>' ) , <EOL> seq_test ( actual = seqs . OCTOTHORP , expected = '<STR_LIT:#>' ) , <EOL> seq_test ( actual = seqs . PAGE_DOWN , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . PAGE_UP , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . PERCENT , expected = '<STR_LIT:%>' ) , <EOL> seq_test ( actual = seqs . PIPE , expected = '<STR_LIT:|>' ) , <EOL> seq_test ( actual = seqs . QUESTION_MARK , expected = '<STR_LIT:?>' ) , <EOL> seq_test ( actual = seqs . QUOTE , expected = "<STR_LIT:'>" ) , <EOL> seq_test ( actual = seqs . QUOTE_QUOTE , expected = "<STR_LIT>" ) , <EOL> seq_test ( actual = seqs . R , expected = '<STR_LIT:r>' ) , <EOL> seq_test ( actual = seqs . RIGHT_BRACE , expected = '<STR_LIT:}>' ) , <EOL> seq_test ( actual = seqs . RIGHT_SQUARE_BRACKET , expected = '<STR_LIT:]>' ) , <EOL> seq_test ( actual = seqs . RIGHT_PAREN , expected = '<STR_LIT:)>' ) , <EOL> seq_test ( actual = seqs . S , expected = '<STR_LIT:s>' ) , <EOL> seq_test ( actual = seqs . SEMICOLON , expected = '<STR_LIT:;>' ) , <EOL> seq_test ( actual = seqs . SHIFT_CTRL_F12 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . SHIFT_F11 , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . SLASH , expected = '<STR_LIT:/>' ) , <EOL> seq_test ( actual = seqs . STAR , expected = '<STR_LIT:*>' ) , <EOL> seq_test ( actual = seqs . T , expected = '<STR_LIT:t>' ) , <EOL> seq_test ( actual = seqs . TAB , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . TILDE , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . U , expected = '<STR_LIT:u>' ) , <EOL> seq_test ( actual = seqs . UNDERSCORE , expected = '<STR_LIT:_>' ) , <EOL> seq_test ( actual = seqs . V , expected = '<STR_LIT:v>' ) , <EOL> seq_test ( actual = seqs . W , expected = '<STR_LIT:w>' ) , <EOL> seq_test ( actual = seqs . X , expected = '<STR_LIT:x>' ) , <EOL> seq_test ( actual = seqs . Y , expected = '<STR_LIT:y>' ) , <EOL> seq_test ( actual = seqs . YY , expected = '<STR_LIT>' ) , <EOL> seq_test ( actual = seqs . ZERO , expected = '<STR_LIT:0>' ) , <EOL> ) <EOL> class Test_KeySequenceNames ( ViewTest ) : <EOL> def testAll ( self ) : <EOL> for ( i , data ) in enumerate ( TESTS_KNOWN_SEQUENCES ) : <EOL> self . assertEqual ( data . actual , data . expected , <EOL> "<STR_LIT>" . format ( i ) ) <EOL> def testAllKeySequenceNamesAreTested ( self ) : <EOL> tested_seqs = [ k . actual for k in TESTS_KNOWN_SEQUENCES ] <EOL> self . assertEqual ( sorted ( tested_seqs ) , <EOL> sorted ( [ v for ( k , v ) in seqs . __dict__ . items ( ) <EOL> if k . isupper ( ) ] ) ) </s>
