def test_tabstops(): screen = Screen(10, 10) # Making sure initial tabstops are in place ... assert screen.tabstops == set([7]) # ... and clearing them. screen.clear_tab_stop(3) assert not screen.tabstops screen.cursor.x = 1 screen.set_tab_stop() screen.cursor.x = 8 screen.set_tab_stop() screen.cursor.x = 0 screen.tab() assert screen.cursor.x == 1 screen.tab() assert screen.cursor.x == 8 screen.tab() assert screen.cursor.x == 9 screen.tab() assert screen.cursor.x == 9