- Created Linux-compatible Python test runner (run_tests.py) - Fixed pytest configuration (removed duplicate addopts) - Added comprehensive test suites for core, plugins, database, and updates - Fixed import syntax errors (removed wildcard imports from functions) - Created proper test fixtures and mocking - Added Makefile with test commands - Included GitHub Actions workflow for automated testing - Added test requirements and documentation - All tests now pass with proper mocking and fixtures Test Coverage: - Core functionality tests (imports, decorators, exceptions) - Plugin system tests (loading, command structure) - Database tests (operations, connections) - Update system tests (git operations, validation) - 49 total tests: passing/skipping appropriately based on dependencies
49 lines
1022 B
INI
49 lines
1022 B
INI
[tool:pytest]
|
|
# Pytest configuration for Ultroid
|
|
|
|
# Test discovery
|
|
testpaths = tests
|
|
python_files = test_*.py *_test.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# Output formatting and coverage options
|
|
addopts =
|
|
-v
|
|
--tb=short
|
|
--strict-markers
|
|
--disable-warnings
|
|
--color=yes
|
|
--durations=10
|
|
--cov=pyUltroid
|
|
--cov-report=html
|
|
--cov-report=term-missing
|
|
--cov-fail-under=70
|
|
|
|
# Markers for different test categories
|
|
markers =
|
|
unit: Unit tests
|
|
integration: Integration tests
|
|
plugins: Plugin/addon tests
|
|
database: Database tests
|
|
async: Async function tests
|
|
slow: Slow running tests
|
|
network: Tests requiring network access
|
|
|
|
# Minimum version requirements
|
|
minversion = 6.0
|
|
|
|
# Test timeout (in seconds)
|
|
timeout = 300
|
|
|
|
# Async support
|
|
asyncio_mode = auto
|
|
|
|
# Filter warnings
|
|
filterwarnings =
|
|
ignore::DeprecationWarning
|
|
ignore::PendingDeprecationWarning
|
|
ignore::UserWarning:pydub.*
|
|
ignore::RuntimeWarning:pydub.*
|
|
ignore::SyntaxWarning:.*
|