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 Networks GmbH.
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 Networks GmbH
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.1.0.tar.gz
.
File metadata
- Download URL: autohooks_plugin_pytest-23.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 038848cd90c011f0a767665bdf3f96c53317ba7fc2f57edfa76e99f392d8432b |
|
MD5 | a22e5082d2c790d0690d63414d6e8983 |
|
BLAKE2b-256 | cf10d49d3943bb3305475cc299c5af4c574dce71b1f640b466dd1321a72c32f9 |
File details
Details for the file autohooks_plugin_pytest-23.1.0-py3-none-any.whl
.
File metadata
- Download URL: autohooks_plugin_pytest-23.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4d0605b20b0625f4e15594dfca441d7c6ece647b94e25b841d9d01bed05705 |
|
MD5 | d172e3f00e5bda7d78c61416f959dd7d |
|
BLAKE2b-256 | 8bcb205643001e7bb6a7765b6929e87de73601a14740d8ac97fa5faa8b2362e6 |