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_app
initializes and returns fully configuredQgsApplication
. This fixture is called automatically on the start of pytest session.qgis_canvas
initializes and returnsQgsMapCanvas
qgis_iface
returns mockedQgsInterface
new_project
makes sure that all the map layers and configurations are removed. This should be used with tests that add stuff toQgsProject
.
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
pytest-qgis-0.1.0.tar.gz
(13.2 kB
view hashes)
Built Distribution
Close
Hashes for pytest_qgis-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483eb7dedca689a8c269d1dc04c9364aeeb5307bcddd8d9a3a3558fc7e3d8614 |
|
MD5 | 589c4260c59c91c28f06d92e420fa4cf |
|
BLAKE2b-256 | f3b54c2a57eca2e506c1989f0e1763cfe1b9f369e8350ee86e8428cb7791f970 |