File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ ignore = [
101101]
102102exclude = [" .venv/" ]
103103mccabe = { max-complexity = 10 }
104- line-length = 88
104+ line-length = 79
105105
106106[tool .ruff .per-file-ignores ]
107107"python/psqlpy/*" = [" PYI021" ]
Original file line number Diff line number Diff line change @@ -492,7 +492,8 @@ class PSQLPool:
492492 [100],
493493 )
494494 dict_result: List[Dict[Any, Any]] = query_result.result()
495- # you don't need to close the pool, it will be dropped on Rust side.
495+ # you don't need to close the pool,
496+ # it will be dropped on Rust side.
496497 ```
497498 """
498499 async def connection (self : Self ) -> Connection :
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ from psqlpy import PSQLPool , QueryResult
4+
5+
6+ @pytest .mark .anyio
7+ async def test_connection_execute (
8+ psql_pool : PSQLPool ,
9+ table_name : str ,
10+ number_database_records : int ,
11+ ) -> None :
12+ """Test that single connection can execute queries."""
13+ connection = await psql_pool .connection ()
14+
15+ conn_result = await connection .execute (
16+ querystring = f"SELECT * FROM { table_name } " ,
17+ )
18+ assert isinstance (conn_result , QueryResult )
19+ assert len (conn_result .result ()) == number_database_records
You can’t perform that action at this time.
0 commit comments