Skip to main content

A pytest plugin to enable format checking with black

Project description

pytest-black-ng

A pytest plugin to enable format checking with black.

This is a fork of the original pytest-black plugin by ShopKeep Inc to provide an up-to-date version of this plugin.

Requirements

There is a minimum requirement of black 22.1.0 or later.

Installation

$ pip install pytest-black-ng

Usage

To run pytest with formatting checks provided by black:

$ pytest --black

The plugin will output a diff of suggested formatting changes (if any exist). Changes will not be applied automatically.

Configuration

You can override default black configuration options by placing a pyproject.toml file in your project directory. See example configuration here.

Testing

To run the tests against a selection of Python interpreters:

$ tox

To run against a specific interpreter (e.g. Python 3.6):

$ tox -e py36

The tox.ini file in the root of this repository is used to configure the test environment.

License

Distributed under the terms of the MIT license, pytest-black-ng is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

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-black-ng-0.4.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

pytest_black_ng-0.4.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pytest-black-ng-0.4.0.tar.gz.

File metadata

  • Download URL: pytest-black-ng-0.4.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pytest-black-ng-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b228b94d63fd08014b8ace0555ef73d1c4b525475c725fe9703e4147e74c52d6
MD5 cc2191582d544bd0c42a566ea3e874b3
BLAKE2b-256 65f831d0392b294309f754f87223cbbfc9ab6e256a70723debfc4981d0d592d8

See more details on using hashes here.

File details

Details for the file pytest_black_ng-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_black_ng-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 494f1144e3c2aa3475132e33e01c2192217e2b341f7829b1e81d0ed4ccb35a74
MD5 188042d6b574151036a080a12c1f5a76
BLAKE2b-256 83b402f27368d7c73085bb35eadefefaee93618d24961b268903769236df78da

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