pytest-filter-subpackage 0.2.0


pip install pytest-filter-subpackage

  Latest version

Released: Mar 04, 2024

Project Links

Meta
Author: The Astropy Developers
Requires Python: >=3.8

Classifiers

Development Status
  • 5 - Production/Stable

Framework
  • Pytest

Intended Audience
  • Developers

License
  • OSI Approved :: BSD License

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12

Topic
  • Software Development :: Testing
  • Utilities
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.

Extras:
Dependencies:
pytest (>=4.6)
packaging