5.3.1.25.9. cli.pre_commit_scripts.check_test_files

Test file presence and style checking for Python and C source files.

This module provides classes and methods for verifying the existence and stylistic correctness of test files corresponding to source files in a project. It supports both Python and C languages.

This module provides utilities to: - Ensure that every file has a corresponding test file; - Check that test files contain the correct docstring and main entry point; - Enforce maximum file path lengths for different parts of the repository.

Classes:

TestFiles: Abstract base class for test file operations. PythonTestFiles: Implements checks for Python test files. CTestFiles: Implements checks for C test files.

Functions

main([argv])

Run test-file checks for provided paths.

Classes

CTestFiles(files)

Handler for C source and test files.

PythonTestFiles(files)

Handler for Python source and test files.

TestFiles()

Abstract base class for test file handling logic.

WscriptTestFiles(files)

Handler for wscript source/test file pairs.