Skip to main content

An autohooks plugin for pytest

Project description

Greenbone Logo

autohooks-plugin-pytest

PyPI release

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

autohooks-plugin-pytest-22.6.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

autohooks_plugin_pytest-22.6.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file autohooks-plugin-pytest-22.6.0.tar.gz.

File metadata

  • Download URL: autohooks-plugin-pytest-22.6.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for autohooks-plugin-pytest-22.6.0.tar.gz
Algorithm Hash digest
SHA256 f1c95930f356b847dd7a5e3ff1c6ecec3dc954c48983bace45a1b7b2475a1e8f
MD5 03e94a56a3533bb680066754a2922d31
BLAKE2b-256 745ea50c62fe0c532c81692cac176cc240c9e70fb999af55396ded44ac268ec1

See more details on using hashes here.

File details

Details for the file autohooks_plugin_pytest-22.6.0-py3-none-any.whl.

File metadata

  • Download URL: autohooks_plugin_pytest-22.6.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for autohooks_plugin_pytest-22.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0aa133747d526a75e6224afeb6acfbd6d7cb7eddf1e9236b936f46e913053073
MD5 7f0232ea2cbe05bf29d9d50d2a6ecae2
BLAKE2b-256 6f1ddd7c55ba54cbf149c6a6069f8738521dce1c8b90e3f60b0853547c64ae89

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page