Merge pull request #14 from latinogino/codex/fix-api-connection-error-in-dolibarr-mcp

Document integration tests and register pytest marker
This commit is contained in:
latinogino
2025-12-31 14:34:44 +01:00
committed by GitHub
2 changed files with 15 additions and 0 deletions

View File

@@ -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

View File

@@ -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"]