From 45ba4236d5364f05cff50fcede8bcb827f12dd5c Mon Sep 17 00:00:00 2001 From: Richard Schwab Date: Mon, 17 Jan 2022 08:33:43 +0100 Subject: [PATCH] ensure test_scroll_errors and test_sscursor_scroll_errors initialize their tables this resulted in test failures in some cases. --- tests/test_cursor.py | 1 + tests/test_sscursor.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_cursor.py b/tests/test_cursor.py index 2cbb9d6b..23b87a98 100644 --- a/tests/test_cursor.py +++ b/tests/test_cursor.py @@ -94,6 +94,7 @@ async def test_scroll_absolute(connection_creator): @pytest.mark.run_loop async def test_scroll_errors(connection_creator): conn = await connection_creator() + await _prepare(conn) cur = await conn.cursor() with pytest.raises(ProgrammingError): diff --git a/tests/test_sscursor.py b/tests/test_sscursor.py index 0d6ac264..c020fe81 100644 --- a/tests/test_sscursor.py +++ b/tests/test_sscursor.py @@ -132,6 +132,7 @@ async def test_sscursor_scroll_absolute(connection): @pytest.mark.run_loop async def test_sscursor_scroll_errors(connection): conn = connection + await _prepare(conn) cursor = await conn.cursor(SSCursor) await cursor.execute('SELECT * FROM tz_data;') @@ -151,7 +152,7 @@ async def test_sscursor_scroll_errors(connection): async def test_sscursor_cancel(connection): conn = connection cur = await conn.cursor(SSCursor) - # Prepare ALOT of data + # Prepare A LOT of data await cur.execute('DROP TABLE IF EXISTS long_seq;') await cur.execute(