From 59756eaff7b8da86179cc8617312df0d7076f9e2 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Fri, 24 Oct 2025 17:27:27 +0000 Subject: [PATCH] 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 --- pytest.ini | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..0396ddf --- /dev/null +++ b/pytest.ini @@ -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