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 --- tests/conftest.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/conftest.py') 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 @@ import asyncio import os +import sys import tempfile from unittest.mock import AsyncMock, MagicMock import pytest @@ -7,6 +8,8 @@ import pytest import discord from discord.ext import commands +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) + @pytest.fixture(autouse=True, scope="function") def setup_test_env(monkeypatch): -- cgit v1.2.3