File tree Expand file tree Collapse file tree
by-language/python-sqlalchemy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ colorlog<7
33crate >= 2.1.2
44pandas >= 2.3 ,< 3.1
55pueblo >= 0.0.18
6- sqlalchemy-cratedb [all ] @ git+https://github.com/crate-workbench/sqlalchemy-cratedb@amo/postgresql-async
6+ sqlalchemy-cratedb [all ]>= 0.43.1
Original file line number Diff line number Diff line change 11import shlex
22import subprocess
3+ import pytest
34
45
56def run (command : str ):
67 subprocess .check_call (shlex .split (command ))
78
89
910def test_read_urllib3 ():
10- cmd = "time python read_pandas.py --dburi=crate+urllib3 ://crate@localhost:4200"
11+ cmd = "time python read_pandas.py --dburi=crate://crate@localhost:4200"
1112 run (cmd )
1213
1314
15+ # TODO: Remove skip when psycopg dialect is released in sqlalchemy-cratedb
16+ @pytest .mark .skip (reason = "psycopg dialect not yet in released sqlalchemy-cratedb" )
1417def test_read_psycopg3 ():
1518 cmd = "time python read_pandas.py --dburi=crate+psycopg://crate@localhost:5432"
1619 run (cmd )
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ colorlog<7
33crate >= 2.1.2
44pueblo >= 0.0.18
55sqlalchemy >= 2.0.49 ,< 2.1
6- sqlalchemy-cratedb [all ] @ git+https://github.com/crate-workbench/sqlalchemy-cratedb@amo/postgresql-async
6+ sqlalchemy-cratedb [all ]>= 0.43.1
Original file line number Diff line number Diff line change @@ -8,13 +8,14 @@ def run(command: str):
88
99
1010def test_insert_efficient_multirow ():
11- insert_records = 25_000
11+ # CrateDB enforces statement_max_length=262144; keep well under that limit.
12+ insert_records = 5_000
1213 cmd = f"time python insert_efficient.py cratedb multirow { insert_records } "
1314 run (cmd )
1415
1516
1617def test_insert_efficient_batched ():
17- insert_records = 50_000
18+ insert_records = 5_000
1819 cmd = f"time python insert_efficient.py cratedb batched { insert_records } "
1920 run (cmd )
2021
@@ -26,17 +27,20 @@ def test_insert_efficient_unknown(capfd):
2627 out , err = capfd .readouterr ()
2728 assert "ValueError: Unknown variant: unknown" in err
2829
29-
30+ # TODO: Remove skip when psycopg/asyncpg dialect is released in sqlalchemy-cratedb
31+ @pytest .mark .skip (reason = "psycopg/asyncpg dialect not yet in released sqlalchemy-cratedb" )
3032def test_sync_table ():
3133 cmd = "time python sync_table.py urllib3 psycopg"
3234 run (cmd )
3335
3436
37+ @pytest .mark .skip (reason = "psycopg/asyncpg dialect not yet in released sqlalchemy-cratedb" )
3538def test_async_table ():
3639 cmd = "time python async_table.py psycopg asyncpg"
3740 run (cmd )
3841
3942
43+ @pytest .mark .skip (reason = "psycopg/asyncpg dialect not yet in released sqlalchemy-cratedb" )
4044def test_async_streaming ():
4145 cmd = "time python async_streaming.py psycopg asyncpg"
4246 run (cmd )
You can’t perform that action at this time.
0 commit comments