MCPcopy
hub / github.com/psycopg/psycopg / test_scrollable

Function test_scrollable

tests/test_cursor_server_async.py:506–515  ·  view source on GitHub ↗
(aconn)

Source from the content-addressed store, hash-verified

504
505@pytest.mark.crdb_skip("scroll cursor")
506async def test_scrollable(aconn):
507 curs = aconn.cursor("foo", scrollable=True)
508 assert curs.scrollable is True
509 await curs.execute("select generate_series(0, 5)")
510 await curs.scroll(5)
511 for i in range(4, -1, -1):
512 await curs.scroll(-1)
513 assert i == (await curs.fetchone())[0]
514 await curs.scroll(-1)
515 await curs.close()
516
517
518async def test_non_scrollable(aconn):

Callers

nothing calls this directly

Calls 5

cursorMethod · 0.45
executeMethod · 0.45
scrollMethod · 0.45
fetchoneMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…