5.3.1.25.9.3. cli.pre_commit_scripts.check_test_files.PythonTestFiles

class cli.pre_commit_scripts.check_test_files.PythonTestFiles(files: set[Path])

Handler for Python source and test files.

__init__(files: set[Path])

Initialize a PythonTestFiles object.

Parameters:

files – Set of file paths used to scope checks.

Methods

__init__(files)

Initialize a PythonTestFiles object.

check_for_missing_test_files([verbose])

Check for missing test files for each Python source.

check_style([verbose])

Check Python test files for docstring and main/unittest style.

check_test_files([verbose])

Run all checks for Python test files.

echo_feedback(err[, verbose])

Print feedback to the user about test file presence.

Attributes

test_type

Type of test files handled.