Method: pylint.testutils.pyreverse.get_functional_test_files
Calls: 2, Exceptions: 0, Paths: 1Back
Path 1: 2 calls (1.0)
PosixPath (2)
list (2)
1def get_functional_test_files(
2 root_directory: Path,
3) -> list[FunctionalPyreverseTestfile]:
4 """Get all functional test files from the given directory."""
5 test_files = []
6 for path in root_directory.rglob("*.py"):
7 if path.stem.startswith("_"):
8 continue
9 config_file = path.with_suffix(".rc")
10 if config_file.exists():
11 test_files.append(
12 FunctionalPyreverseTestfile(
13 source=path, options=_read_config(config_file)
14 )
15 )
16 else:
17 test_files.append(
18 FunctionalPyreverseTestfile(
19 source=path,
20 options={"output_formats": ["mmd"], "command_line_args": []},
21 )
22 )
23 return test_files