aboutsummaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-04-29 14:22:03 +0200
committersalmonik <raisersoft@proton.me>2026-04-29 14:22:03 +0200
commitdba3388567818cb5c60be9d406d3e1cccc84b3ea (patch)
tree53a0903f7a4c381c7ad12e3e632ef8dd8ebba39f /tests/conftest.py
parentmultitude of changes. (diff)
downloadsenator-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.py3
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 @@
1import asyncio 1import asyncio
2import os 2import os
3import sys
3import tempfile 4import tempfile
4from unittest.mock import AsyncMock, MagicMock 5from unittest.mock import AsyncMock, MagicMock
5import pytest 6import pytest
@@ -7,6 +8,8 @@ import pytest
7import discord 8import discord
8from discord.ext import commands 9from discord.ext import commands
9 10
11sys.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")
12def setup_test_env(monkeypatch): 15def setup_test_env(monkeypatch):