Skip to content

Commit 15cd56d

Browse files
committed
Set line length to 79
1 parent fbb0dbf commit 15cd56d

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ignore = [
101101
]
102102
exclude = [".venv/"]
103103
mccabe = { max-complexity = 10 }
104-
line-length = 88
104+
line-length = 79
105105

106106
[tool.ruff.per-file-ignores]
107107
"python/psqlpy/*" = ["PYI021"]

python/psqlpy/_internal/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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:

python/tests/test_connection.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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

0 commit comments

Comments
 (0)