An autohooks plugin for pytest
Project description
autohooks-plugin-pytest
An autohooks plugin for pytest.
Installation
Install using pip
You can install the latest stable release of autohooks-plugin-pytest from the Python Package Index using pip:
python3 -m pip install autohooks-plugin-pytest
Install using poetry
It is highly encouraged to use poetry for maintaining your project's dependencies. Normally autohooks-plugin-pytest is installed as a development dependency.
poetry install
Usage
To activate the pytest autohooks plugin please add the following setting to your pyproject.toml file.
[tool.autohooks]
pre-commit = ["autohooks.plugins.pytest"]
By default, autohooks plugin pytest checks all files with a .py ending. If only files in a sub-directory or files with different endings should be tested, just add the following setting:
[tool.autohooks]
pre-commit = ["autohooks.plugins.pytest"]
[tool.autohooks.plugins.pytest]
include = ['foo/*.py', '*.foo']
By default, autohooks plugin pytest executes pytest without any arguments and pytest settings are loaded from the .pytestrc file in the root directory of git repository. To change specific settings or to define a different pytest rc file the following plugin configuration can be used:
[tool.autohooks]
pre-commit = ["autohooks.plugins.pytest"]
[tool.autohooks.plugins.pytest]
arguments = ["--rcfile=/path/to/pytestrc", "-s", "n"]
Maintainer
This project is maintained by Greenbone AG.
Contributing
Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.
License
Copyright (C) 2021-2022 Greenbone AG
Licensed under the GNU General Public License v3.0 or later.
Project details
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
File details
Details for the file autohooks_plugin_pytest-23.4.0.tar.gz
.
File metadata
- Download URL: autohooks_plugin_pytest-23.4.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 950fe51f9c611372a9cf4b3bc394bc97b0517277b5a44e8b37ab14ad9f5f0a97 |
|
MD5 | 724df0dd6602b85019660f41fa3adc2c |
|
BLAKE2b-256 | 45553b89feaa85fb17b992fb343ca344080854b3432abf5641609fb3d8bbaa18 |
File details
Details for the file autohooks_plugin_pytest-23.4.0-py3-none-any.whl
.
File metadata
- Download URL: autohooks_plugin_pytest-23.4.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c37c60eeff67a0928fe38e4e2bdecc3ba4f865b69c8c02ec0c8ce1cdbd2f4b8c |
|
MD5 | 78ef0efbe9c7e0d83ccb9bc0210cfebd |
|
BLAKE2b-256 | cab7be3d0e091ddcf0fb6e2c0b212150171a151782837e5d641e98a9ecce2f20 |