mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-03-30 20:15:40 +00:00
- Enhanced .gitignore to allow test files in the tests/ directory and committed pytest.ini for test discovery. - Added checks for missing sections in configuration files, specifically for Admin_ACL and Banned_Users, to prevent errors during bot startup. - Updated generate_website.py and command_manager.py to handle cases where required sections are absent, returning empty lists instead of raising exceptions. - Introduced optional dependencies for testing in pyproject.toml, ensuring a smoother development experience. - Improved localization handling in core.py to default to English when the Localization section is missing, enhancing user experience.
30 lines
609 B
INI
30 lines
609 B
INI
[pytest]
|
|
# Pytest configuration for meshcore-bot tests
|
|
|
|
# Test discovery patterns
|
|
python_files = test_*.py *_test.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# Test paths
|
|
testpaths = tests
|
|
|
|
# Async test support
|
|
asyncio_mode = auto
|
|
|
|
# Coverage configuration (optional)
|
|
# [tool:pytest]
|
|
# addopts = --cov=modules --cov-report=html --cov-report=term-missing
|
|
|
|
# Output options
|
|
addopts =
|
|
-v
|
|
--tb=short
|
|
--strict-markers
|
|
|
|
# Markers for test categorization
|
|
markers =
|
|
unit: Unit tests (isolated, with mocks)
|
|
integration: Integration tests (with real database)
|
|
slow: Slow running tests
|