db.py: - Add conn.isolation_level = None to get_conn() — fixes row_factory + autocommit conflict. row_factory disables implicit transactions, so we need explicit autocommit mode. - Remove all conn.commit() calls (unnecessary with autocommit) pyproject.toml: - Move pytest + pytest-asyncio to main dependencies (uv run pytest uses ephemeral env with main deps only) tests/test_db.py: - Fix test_upsert_user_updates_username to not chain upsert_user() calls in assert expressions (test isolation issue)
19 lines
422 B
TOML
19 lines
422 B
TOML
[project]
|
|
name = "jigaido-telegram-bot"
|
|
version = "0.1.0"
|
|
description = "Telegram bounty tracker for JIGAIDO"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"python-telegram-bot>=21.6",
|
|
"dateparser>=1.2.0",
|
|
"pytest>=8.3.5",
|
|
"pytest-asyncio>=0.25.2",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
asyncio_mode = "auto"
|