From d30ff4a84a15c374ed4468aa5d01eb234624db38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Feb 2026 07:24:58 +0000 Subject: [PATCH] Add pytest configuration with sensible defaults - Add [tool.pytest.ini_options] section to pyproject.toml - Configure verbose output (-v) by default - Enable strict marker and config enforcement - Define test discovery patterns (test_*.py, Test*, test_*) - Add 'slow' marker for future test categorization - Document pytest configuration in README Completes pytest-xdist setup that was partially implemented. pytest-xdist dependency was already in pyproject.toml and documented in README, but lacked pytest configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 3 +++ pyproject.toml | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 6294b108..d9d08e06 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,9 @@ pip install pytest pytest-mock pytest-xdist # Run all tests pytest tests/ + +# Pytest configuration is in pyproject.toml with sensible defaults +# Tests are verbose by default (-v) with strict marker/config enforcement ``` **Parallel test execution (recommended):** diff --git a/pyproject.toml b/pyproject.toml index 4cc94100..42141e03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,3 +15,17 @@ dev = [ "pytest-mock>=3.10.0", "pytest-xdist>=3.0.0", ] + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = ["test_*.py"] +python_classes = ["Test*"] +python_functions = ["test_*"] +addopts = [ + "-v", + "--strict-markers", + "--strict-config", +] +markers = [ + "slow: marks tests as slow (deselect with '-m \"not slow\"')", +]