Skip to main content

Invalid test name checker, plugin for flake8

Project description

Build status Coverage Status

An extension for Flake8 to make sure that test function name follows a given convention

Plugin for Flake8

When both Flake8 and flake8-test-name are installed, the plugin will show up when displaying the version of flake8:

$ flake8 --version
3.6.0 (flake8-test-name: 0.1.0, […]

Parameters

This module can be configured in 2 ways: –test-func-name-validator-module={path} –test-func-name-validator-regex={regex_pattern}

E.g usage:

$ flake8 myproject/tests/sample.py --test-func-name-validator-regex="test_funky_convention_.*" --select=II101

>>/home/.../tests/sample.py:14:1: TN101 test function name does not match the convention (test_invalid_method_sample)

Error codes

This plugin is using the following error codes:

Test function name validation

TN101

TN101 test function name does not match the convention

Operation

The plugin will go through all files, identify the tests directories, and validate method starting with test_ against your validator.

Changes

0.1.0 - 2021-03-xx

  • Initial release

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

flake8-test-name-0.1.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

flake8_test_name-0.1.1-py2.py3-none-any.whl (4.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flake8-test-name-0.1.1.tar.gz.

File metadata

  • Download URL: flake8-test-name-0.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for flake8-test-name-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fa58570ab14f479b2556c4e2b4e204f0daf8b49df45d2425453ecda7d8a75d36
MD5 0620988d57913d60a7182b376d8ea0b1
BLAKE2b-256 2fd75f3358e889438b5a81da2d30086c14a6846e7ca9f19818ec22d2b93a2843

See more details on using hashes here.

File details

Details for the file flake8_test_name-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: flake8_test_name-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for flake8_test_name-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 09eb23616ad1539b1ddb4628db2a9eaee21ae710e5b1e7032e4915270d10bbce
MD5 0a478ccb97eb0d0958197e9c45e99098
BLAKE2b-256 c150420ee5cdf9ba0ab36daf6e2d5d2f66a83c61ab0e317dc751f126d0b7450a

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