MCPcopy
hub / github.com/Textualize/textual / test_move_cursor

Function test_move_cursor

tests/test_data_table.py:1214–1227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1212
1213
1214async def test_move_cursor():
1215 app = DataTableApp()
1216
1217 async with app.run_test():
1218 table = app.query_one(DataTable)
1219 table.add_columns(*"These are some columns in your nice table".split())
1220 table.add_rows(["These are some columns in your nice table".split()] * 10)
1221
1222 table.move_cursor(row=4, column=6)
1223 assert table.cursor_coordinate == Coordinate(4, 6)
1224 table.move_cursor(row=3)
1225 assert table.cursor_coordinate == Coordinate(3, 6)
1226 table.move_cursor(column=3)
1227 assert table.cursor_coordinate == Coordinate(3, 3)
1228
1229
1230async def test_unset_hover_highlight_when_no_table_cell_under_mouse():

Callers

nothing calls this directly

Calls 8

CoordinateClass · 0.90
DataTableAppClass · 0.85
run_testMethod · 0.80
query_oneMethod · 0.80
add_columnsMethod · 0.80
add_rowsMethod · 0.80
splitMethod · 0.45
move_cursorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…