Files
masto-rss/pytest.ini
aserper c8618ec3b7 Add comprehensive test suite with GitHub Actions CI/CD
- Refactor code into testable bot.py module with MastodonRSSBot class
- Create 20+ unit tests covering core functionality and edge cases
- Create 10+ integration tests for RSS parsing and Mastodon posting
- Add GitHub Actions workflow for automated testing
  - Unit tests on Python 3.10, 3.11, 3.12
  - Integration tests with mocked external services
  - Code quality checks (flake8, black, mypy)
  - Docker build validation
- Configure pytest with 80% minimum coverage requirement
- Add test dependencies in requirements-test.txt
- Update .gitignore to exclude test artifacts
- Add comprehensive TESTING.md documentation
- Add test status badge to README
- Maintain full backward compatibility with existing setup
2025-12-12 23:30:38 -05:00

47 lines
871 B
INI

[pytest]
# Pytest configuration for Masto-RSS
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Output options
addopts =
-v
--strict-markers
--tb=short
--cov=bot
--cov=main
--cov-report=term-missing
--cov-report=html
--cov-report=xml
--cov-fail-under=80
# Test paths
testpaths = .
# Markers
markers =
unit: Unit tests that don't require external services
integration: Integration tests that may use mocked external services
slow: Tests that take a long time to run
# Coverage options
[coverage:run]
source = .
omit =
test_*.py
.venv/*
*/__pycache__/*
*/site-packages/*
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING: