diff options
| author | salmonik <raisersoft@proton.me> | 2026-04-29 14:22:03 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-04-29 14:22:03 +0200 |
| commit | dba3388567818cb5c60be9d406d3e1cccc84b3ea (patch) | |
| tree | 53a0903f7a4c381c7ad12e3e632ef8dd8ebba39f /tests/conftest.py | |
| parent | multitude of changes. (diff) | |
| download | senator-sperma-dba3388567818cb5c60be9d406d3e1cccc84b3ea.tar.gz senator-sperma-dba3388567818cb5c60be9d406d3e1cccc84b3ea.zip | |
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
Diffstat (limited to '')
| -rw-r--r-- | tests/conftest.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 01ece10..6b7c3bc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | import asyncio | 1 | import asyncio |
| 2 | import os | 2 | import os |
| 3 | import sys | ||
| 3 | import tempfile | 4 | import tempfile |
| 4 | from unittest.mock import AsyncMock, MagicMock | 5 | from unittest.mock import AsyncMock, MagicMock |
| 5 | import pytest | 6 | import pytest |
| @@ -7,6 +8,8 @@ import pytest | |||
| 7 | import discord | 8 | import discord |
| 8 | from discord.ext import commands | 9 | from discord.ext import commands |
| 9 | 10 | ||
| 11 | sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||
| 12 | |||
| 10 | 13 | ||
| 11 | @pytest.fixture(autouse=True, scope="function") | 14 | @pytest.fixture(autouse=True, scope="function") |
| 12 | def setup_test_env(monkeypatch): | 15 | def setup_test_env(monkeypatch): |
