<s> """<STR_LIT>""" <EOL> import unittest <EOL> from test . test_support import run_unittest , import_module <EOL> readline = import_module ( '<STR_LIT>' ) <EOL> class TestHistoryManipulation ( unittest . TestCase ) : <EOL> @ unittest . skipIf ( not hasattr ( readline , '<STR_LIT>' ) , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def testHistoryUpdates ( self ) : <EOL> readline . clear_history ( ) <EOL> readline . add_history ( "<STR_LIT>" ) <EOL> readline . add_history ( "<STR_LIT>" ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:0> ) , None ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:1> ) , "<STR_LIT>" ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:2> ) , "<STR_LIT>" ) <EOL> readline . replace_history_item ( <NUM_LIT:0> , "<STR_LIT>" ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:0> ) , None ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:1> ) , "<STR_LIT>" ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:2> ) , "<STR_LIT>" ) <EOL> self . assertEqual ( readline . get_current_history_length ( ) , <NUM_LIT:2> ) <EOL> readline . remove_history_item ( <NUM_LIT:0> ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:0> ) , None ) <EOL> self . assertEqual ( readline . get_history_item ( <NUM_LIT:1> ) , "<STR_LIT>" ) <EOL> self . assertEqual ( readline . get_current_history_length ( ) , <NUM_LIT:1> ) <EOL> def test_main ( ) : <EOL> run_unittest ( TestHistoryManipulation ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> test_main ( ) </s>
