Skip to content

Commit

Permalink
Remove async tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Aug 29, 2024
1 parent ee7a30a commit 10d91a0
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions tests/test_cursor_async_io.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
from helpers import for_one_database, open_cursor
from query_fixture import query_fixture
import pytest
from helpers import for_one_database # , open_cursor

# from query_fixture import query_fixture


@for_one_database
def test_many_batches_with_async_io(dsn, configuration):
with open_cursor(configuration, use_async_io=True) as cursor:
with query_fixture(cursor, configuration, "INSERT INTEGER") as table_name:
# insert 2^16 rows
cursor.execute(f"INSERT INTO {table_name} VALUES (1)")
for _ in range(16):
cursor.execute(f"INSERT INTO {table_name} SELECT * FROM {table_name}")

cursor.execute(f"SELECT * FROM {table_name}")
assert sum(1 for _ in cursor) == 2**16
pytest.skip("async_io will be removed in future")
# with open_cursor(configuration, use_async_io=True) as cursor:
# with query_fixture(cursor, configuration, "INSERT INTEGER") as table_name:
# # insert 2^16 rows
# cursor.execute(f"INSERT INTO {table_name} VALUES (1)")
# for _ in range(16):
# cursor.execute(f"INSERT INTO {table_name} SELECT * FROM {table_name}")

# cursor.execute(f"SELECT * FROM {table_name}")
# assert sum(1 for _ in cursor) == 2**16

0 comments on commit 10d91a0

Please sign in to comment.