From 82fa47d9e75bde00cba35d5cd153867e50ce8221 Mon Sep 17 00:00:00 2001 From: latinogino <154024559+latinogino@users.noreply.github.com> Date: Wed, 31 Dec 2025 14:34:35 +0100 Subject: [PATCH] Document integration tests and register pytest marker --- docs/development.md | 12 ++++++++++++ pyproject.toml | 3 +++ 2 files changed, 15 insertions(+) diff --git a/docs/development.md b/docs/development.md index bed6fb1..cdeaf81 100644 --- a/docs/development.md +++ b/docs/development.md @@ -41,6 +41,18 @@ If you encounter "command not found" errors, ensure your virtual environment is python3 -m pytest ``` +### Integration tests + +The suite includes a small number of `@pytest.mark.integration` tests that hit a +real Dolibarr instance. They are skipped by default unless valid credentials are +present. To run them: + +```bash +export DOLIBARR_URL="https://your-dolibarr.example.com/api/index.php" +export DOLIBARR_API_KEY="your-api-key" +pytest -m integration +``` + ## Formatting and linting The project intentionally avoids heavy linting dependencies. Follow the coding diff --git a/pyproject.toml b/pyproject.toml index 88b6a00..c68a0ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,9 @@ python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] addopts = "-v --tb=short --cov=src/dolibarr_mcp" +markers = [ + "integration: tests that require a real Dolibarr instance and valid credentials", +] [tool.coverage.run] source = ["src/dolibarr_mcp"]