This directory contains all test code for the iLovePDF Python library. Tests are organized to ensure code quality, reliability, and correct integration with the iLovePDF API.
-
unit/Contains unit tests for individual modules and classes. Seeunit/README.mdfor details. -
integration/Contains integration tests that interact with the iLovePDF API and test complete workflows. Seeintegration/README.mdfor details.
You can run tests using pytest:
pytest tests/unit
pytest tests/integrationOr run all tests at once:
pytest testsFor integration tests, ensure you have set up the required environment variables as described in .docker/README.md.
To run tests in an isolated environment with multiple Python versions, use Docker Compose:
docker-compose -f .docker/docker-compose.yml run python310
docker-compose -f .docker/docker-compose.yml run python311See .docker/README.md for full instructions.
- Unit tests cover all core modules and public interfaces.
- Integration tests cover end-to-end scenarios and API interactions.
Each new core module or task must include:
- At least one unit test in
unit/ - At least one integration test in
integration/
For more information, refer to the README files in each subfolder.