A pytest plugin for testing QGIS python plugins
Project description
pytest-qgis
A pytest plugin for testing QGIS python plugins.
Features
This plugin makes it easier to write QGIS plugin tests with the help of some fixtures:
qgis_appinitializes and returns fully configuredQgsApplication. This fixture is called automatically on the start of pytest session.qgis_canvasinitializes and returnsQgsMapCanvasqgis_ifacereturns mockedQgsInterfacenew_projectmakes sure that all the map layers and configurations are removed. This should be used with tests that add stuff toQgsProject.qgis_processinginitializes the processing framework. This can be used when testing code that callsprocessing.run(...).
Requirements
This pytest plugin requires QGIS >= 3.10 to work.
Installation
Install with pip:
pip install pytest-qgis
Contributing
Contributions are very welcome.
License
Distributed under the terms of the GNU GPL v2.0 license, "pytest-qgis" is free and open source software.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest-qgis-1.0.0.tar.gz.
File metadata
- Download URL: pytest-qgis-1.0.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e65dc5989d46a4697c0422741c1f6097c324e52f5b186e9e42b14c8481d03c3
|
|
| MD5 |
2d23a7f2d6352f562b707e94c083c4c7
|
|
| BLAKE2b-256 |
39b65497a53022c03010a76db0c158ed680d18092c85ebc524de20fde91c0325
|
File details
Details for the file pytest_qgis-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pytest_qgis-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb8a13dffc07a4f338c905626da5907e83e4b7cab7c1311619fe1ebd8798f35
|
|
| MD5 |
4c73d6e969593c41c71f702521f08634
|
|
| BLAKE2b-256 |
d6028a433416468490c387b15254d728ec6fe6635762ea2a7f8262b922ed4f11
|