mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 12:23:42 +03:00
Really test named cursors in test_scroll_named()
This commit is contained in:
parent
5c99d2a456
commit
2e3833f7fb
|
@ -402,7 +402,7 @@ class CursorTests(ConnectingTestCase):
|
||||||
|
|
||||||
@skip_before_postgres(8, 0)
|
@skip_before_postgres(8, 0)
|
||||||
def test_scroll_named(self):
|
def test_scroll_named(self):
|
||||||
cur = self.conn.cursor()
|
cur = self.conn.cursor('tmp', scrollable=True)
|
||||||
cur.execute("select generate_series(0,9)")
|
cur.execute("select generate_series(0,9)")
|
||||||
cur.scroll(2)
|
cur.scroll(2)
|
||||||
self.assertEqual(cur.fetchone(), (2,))
|
self.assertEqual(cur.fetchone(), (2,))
|
||||||
|
@ -412,8 +412,6 @@ class CursorTests(ConnectingTestCase):
|
||||||
self.assertEqual(cur.fetchone(), (8,))
|
self.assertEqual(cur.fetchone(), (8,))
|
||||||
cur.scroll(9, mode='absolute')
|
cur.scroll(9, mode='absolute')
|
||||||
self.assertEqual(cur.fetchone(), (9,))
|
self.assertEqual(cur.fetchone(), (9,))
|
||||||
self.assertRaises((IndexError, psycopg2.ProgrammingError),
|
|
||||||
cur.scroll, 10, mode='absolute')
|
|
||||||
|
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user