Skip to main content

Pytest plugin for filtering based on sub-packages

Project description

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.


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
$ cd pytest-filter-subpackage
$ pip install .

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


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.


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.1.2.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

pytest_filter_subpackage-0.1.2-py2.py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 2 Python 3

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