From dba3388567818cb5c60be9d406d3e1cccc84b3ea Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 29 Apr 2026 14:22:03 +0200 Subject: Refactor database connections and add integration tests - Use context managers for sqlite3 connections in cron, vclogs, and database utils - Add URL helper utility for yt-dlp with clean_url_for_ytdlp function - Add slow integration test markers and new integration test files - Fix test imports to use conftest directly instead of tests.conftest - Improve downloader error handling and use COPYPARTY_URL_UPLOAD env var - Update pytest.ini with slow test markers and warning filters - Document slow test usage in AGENTS.md --- AGENTS.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 44be9d5..8d0b743 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,3 +26,8 @@ - Tests in `tests/cogs/test_*.py` - Uses pytest-asyncio with `asyncio_default_fixture_loop_scope = function` - `conftest.py` provides fixtures for mocking Discord objects +- **Slow integration tests** marked with `@pytest.mark.slow` + - Test real-world feature usage with longer execution times + - Includes: voice session tracking, cron job execution, music playback lifecycle, downloader flow, trigger responses + - Run only fast tests: `.venv/bin/pytest -m "not slow"` + - Run only slow tests: `.venv/bin/pytest -m slow` -- cgit v1.2.3