From: Daniele Varrazzo Date: Tue, 7 Jun 2022 23:11:45 +0000 (+0200) Subject: test(crdb): tag better the skip reason for server-side tests X-Git-Tag: 3.1~49^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=266290623e577cb47b62f991a88694660b0e3b1f;p=thirdparty%2Fpsycopg.git test(crdb): tag better the skip reason for server-side tests Still skip all the other DECLARE tests; waiting for a couple of issues being fixed in CRDB. --- diff --git a/tests/test_server_cursor.py b/tests/test_server_cursor.py index 97a5b1e47..350d95b65 100644 --- a/tests/test_server_cursor.py +++ b/tests/test_server_cursor.py @@ -329,6 +329,7 @@ def test_no_result(conn): assert cur.fetchall() == [] +@pytest.mark.crdb_skip("scroll cursor") def test_row_factory(conn): n = 0 @@ -414,6 +415,7 @@ def test_cant_scroll_by_default(conn): cur.close() +@pytest.mark.crdb_skip("scroll cursor") def test_scroll(conn): cur = conn.cursor("tmp", scrollable=True) cur.execute("select generate_series(0,9)") @@ -431,6 +433,7 @@ def test_scroll(conn): cur.close() +@pytest.mark.crdb_skip("scroll cursor") def test_scrollable(conn): curs = conn.cursor("foo", scrollable=True) assert curs.scrollable is True @@ -464,6 +467,7 @@ def test_no_hold(conn, kwargs): curs.fetchone() +@pytest.mark.crdb_skip("cursor with hold") def test_hold(conn): with conn.cursor("foo", withhold=True) as curs: assert curs.withhold is True diff --git a/tests/test_server_cursor_async.py b/tests/test_server_cursor_async.py index 83c370826..337f1677f 100644 --- a/tests/test_server_cursor_async.py +++ b/tests/test_server_cursor_async.py @@ -340,6 +340,7 @@ async def test_no_result(aconn): assert (await cur.fetchall()) == [] +@pytest.mark.crdb_skip("scroll cursor") async def test_row_factory(aconn): n = 0 @@ -430,6 +431,7 @@ async def test_cant_scroll_by_default(aconn): await cur.close() +@pytest.mark.crdb_skip("scroll cursor") async def test_scroll(aconn): cur = aconn.cursor("tmp", scrollable=True) await cur.execute("select generate_series(0,9)") @@ -447,6 +449,7 @@ async def test_scroll(aconn): await cur.close() +@pytest.mark.crdb_skip("scroll cursor") async def test_scrollable(aconn): curs = aconn.cursor("foo", scrollable=True) assert curs.scrollable is True @@ -480,6 +483,7 @@ async def test_no_hold(aconn, kwargs): await curs.fetchone() +@pytest.mark.crdb_skip("cursor with hold") async def test_hold(aconn): async with aconn.cursor("foo", withhold=True) as curs: assert curs.withhold is True