Skip to main content

Pytest plugin for filtering based on sub-packages

Project description

https://dev.azure.com/astropy-project/pytest-filter-subpackage/_apis/build/status/astropy.pytest-filter-subpackage?branchName=main

This package contains a simple plugin for the pytest framework that provides a shortcut to testing all code and documentation for a given sub-package.

Installation

The pytest-filter-subpackage plugin can be installed using pip:

$ pip install pytest-filter-subpackage

It is also possible to install the latest development version from the source repository:

$ git clone https://github.com/astropy/pytest-filter-subpackage
$ cd pytest-filter-subpackage
$ pip install .

In either case, the plugin will automatically be registered for use with pytest.

Usage

This plugin provides a -P option which takes a comma-separated list of sub-package names (without the top-level package name):

pytest -P wcs,io.fits

which is equivalent to:

pytest **/wcs **/io/fits

When used in conjunction with pytest-doctestplus this will result in both the narrative documentation and code being tested for a given sub-package.

License

This plugin is licensed under a 3-clause BSD style license - see the LICENSE.rst file.

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

pytest-filter-subpackage-0.2.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

pytest_filter_subpackage-0.2.0-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytest-filter-subpackage-0.2.0.tar.gz.

File metadata

File hashes

Hashes for pytest-filter-subpackage-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3f468f1b36518128869b95deab661ba45ed6293854329fef14da4c8cac78af56
MD5 3c9ed5317f82cbcd782e4c15691479b5
BLAKE2b-256 82f310d46a1dcd2245854db8654a27e48da727411e88ed4afa7fc24331ff217c

See more details on using hashes here.

File details

Details for the file pytest_filter_subpackage-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_filter_subpackage-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b4a8c21b52110c3fefe949229c387c18be081132138ca3acc4953869a459b3f6
MD5 b5b03316184a60e71b6a5ebcac669383
BLAKE2b-256 acf82ed436b6ef3fb46743ba6e562c5421493d695c6534f051420ef2b5a99258

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