Testing#
SalesPyForce tests are organized into:
tests/unit/for fast, deterministic unit teststests/integration/for opt-in tests that require real helper credentials
Run the Test Suite#
Install dependencies and run all tests:
Warning
SalesPyForce 1.5.0 is the final release that supports Python 3.9, 3.10, and 3.11.
SalesPyForce 2.0.0 and newer will require Python 3.12 or newer.
poetry install
poetry run pytest -q
Run only unit tests:
poetry run pytest tests/unit -q
Integration Tests#
Integration tests are opt-in and require helper credentials. To include them:
poetry run pytest --integration tests/integration -q
If no helper file is available, integration tests are skipped automatically.
Coverage#
Run coverage locally with:
poetry run pytest --cov-report=xml --cov=salespyforce --cov-fail-under=50 tests/unit tests/integration --color=yes
The --cov-fail-under=50 threshold matches CI and fails the run if total
coverage drops below 50%.