Add pytest configuration for optional pytest usage

Provides:
- pytest-django integration
- Test discovery patterns
- Output formatting options
- Coverage configuration
- Test markers for organization
- Ignore paths
This commit is contained in:
2025-10-24 17:27:27 +00:00
parent bb90ff1a8f
commit 59756eaff7

60
pytest.ini Normal file
View File

@@ -0,0 +1,60 @@
[tool:pytest]
# Pytest configuration for vgui-cicd project
# To use pytest instead of Django's test runner:
# pip install pytest pytest-django
# pytest
DJANGO_SETTINGS_MODULE = VorgabenUI.settings
python_files = tests.py test_*.py *_tests.py
python_classes = *TestCase *Test
python_functions = test_*
# Test discovery patterns
testpaths =
abschnitte
diagramm_proxy
standards
stichworte
referenzen
rollen
pages
# Output options
addopts =
--verbose
--strict-markers
--tb=short
--reuse-db
# Coverage options (when using pytest-cov)
# Uncomment to enable:
# --cov=.
# --cov-report=html
# --cov-report=term-missing
# Markers for organizing tests
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
unit: marks tests as unit tests
cache: marks tests related to caching
render: marks tests related to rendering
commands: marks tests related to management commands
# Ignore paths
norecursedirs =
.git
.tox
dist
build
*.egg
__pycache__
static
staticfiles
media
data
venv
.venv
# Django-specific settings
django_find_project = false