package documentation

Functional/non regression tests for pylint.

Module checker_test_case Undocumented
Module configuration_test Utility functions for configuration testing.
Module constants Undocumented
Module decorator Undocumented
Package functional No package docstring; 1/1 constant, 2/2 functions, 0/1 exception, 2/2 classes, 0/3 module documented
Module functional_test_file Undocumented
Module get_test_info Undocumented
Module global_test_linter Undocumented
Module lint_module_test Undocumented
Module output_line Undocumented
Module pyreverse No module docstring; 1/2 function, 2/3 classes documented
Module reporter_for_tests Undocumented
Module tokenize_str Undocumented
Module unittest_linter Undocumented
Module utils No module docstring; 1/4 function documented
Package _primer No package docstring; 0/1 constant, 1/1 class, 0/6 module documented
Module _run Classes and functions used to mimic normal pylint runs.

From __init__.py:

Class CheckerTestCase A base testcase class for unit testing individual checker classes.
Class GenericTestReporter Reporter storing plain text messages.
Class LintModuleTest No class docstring; 0/4 instance variable, 0/1 class variable, 1/13 method, 2/2 static methods documented
Class MessageTest No class docstring; 1/7 class variable documented
Class MinimalTestReporter Undocumented
Class UnittestLinter A fake linter class to capture checker messages.
Function create_files Creates directories and files found in <path>.
Function set_config Decorator for setting an option on the linter.
Constant UPDATE_FILE Undocumented
Constant UPDATE_OPTION Undocumented
Variable linter Undocumented
Function _get_tests_info Get python input examples and output messages.
Function _tokenize_str Undocumented
UPDATE_FILE = (source)

Undocumented

Value
Path('pylint-functional-test-update')
UPDATE_OPTION: str = (source)

Undocumented

Value
'--update-functional-output'
def set_config(**kwargs: Any) -> Callable[[Callable[..., None]], Callable[..., None]]: (source)

Decorator for setting an option on the linter. Passing the args and kwargs back to the test function itself allows this decorator to be used on parameterized test cases.

def _get_tests_info(input_dir: str, msg_dir: str, prefix: str, suffix: str) -> list[tuple[str, str]]: (source)

Get python input examples and output messages. We use following conventions for input files and messages: for different inputs: test for python >= x.y -> input = <name>_pyxy.py test for python < x.y -> input = <name>_py_xy.py for one input and different messages: message for python >= x.y -> message = <name>_pyxy.txt lower versions -> message with highest num

Undocumented

def _tokenize_str(code: str) -> list[TokenInfo]: (source)

Undocumented

def create_files(paths: list[str], chroot: str = '.'): (source)

Creates directories and files found in <path>. :param list paths: list of relative paths to files or directories :param str chroot: the root directory in which paths will be created >>> from os.path import isdir, isfile >>> isdir('/tmp/a') False >>> create_files(['a/b/foo.py', 'a/b/c/', 'a/b/c/d/e.py'], '/tmp') >>> isdir('/tmp/a') True >>> isdir('/tmp/a/b/c') True >>> isfile('/tmp/a/b/c/d/e.py') True >>> isfile('/tmp/a/b/foo.py') True