Invalid test name checker, plugin for flake8
Project description
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
Built Distribution
File details
Details for the file flake8-test-name-0.1.0.tar.gz
.
File metadata
- Download URL: flake8-test-name-0.1.0.tar.gz
- Upload date:
- Size: 7.8 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.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c372b57b8634417d1555f58e8f63cb37626b7d998e0d082665bdf5381e24b9b7 |
|
MD5 | b8c5f8cc09004d68ee997cab031a0c29 |
|
BLAKE2b-256 | b50a9300861eeca6db9b925878dc8d878b1ed05e5b0c436d3aa20d36ae78768b |
File details
Details for the file flake8_test_name-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: flake8_test_name-0.1.0-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.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9401c3f4467601981b18e2a60b32ad1e4533a2f01985e84ae66cd078189a49b2 |
|
MD5 | 4cdb1c16fa67cf005442fe3acc7bb935 |
|
BLAKE2b-256 | 397b30a9f9124f335ad15e24aed34a3d6ff1a930007fee419c3e8964db0f474b |