Skip to main content

A pytest plugin to enable format checking with black

Project description

pytest-black

Build Status

A pytest plugin to enable format checking with black.

Requirements

Installation

$ pip install pytest-black

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 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-0.3.9.tar.gz (6.3 kB view details)

Uploaded Source

File details

Details for the file pytest-black-0.3.9.tar.gz.

File metadata

  • Download URL: pytest-black-0.3.9.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.15

File hashes

Hashes for pytest-black-0.3.9.tar.gz
Algorithm Hash digest
SHA256 c743dfeffe6b2cb25c0ed1a84cc306dff4b504b713b5a6d1bc3824fa73a7d693
MD5 83a569fed278c608adfbc2f1377bf8a9
BLAKE2b-256 2d221c54753d63d46d0a37af6dbfaf7bc962e3b524ec36455d664ec39c87ce67

See more details on using hashes here.

Supported by

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