Skip to content

Commit f884802

Browse files
Add a docstring to get_related_files
1 parent ca8a6e4 commit f884802

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

pylint/testutils/configuration_test.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,22 @@ def get_expected_configuration(
6868
return result
6969

7070

71+
def get_related_files(
72+
tested_configuration_file: Union[str, Path], suffix_filter: str
73+
) -> List[Path]:
74+
"""Return all the file related to a test conf file endind with a suffix."""
75+
conf_path = Path(tested_configuration_file)
76+
return [
77+
p
78+
for p in conf_path.parent.iterdir()
79+
if str(p.stem).startswith(conf_path.stem) and str(p).endswith(suffix_filter)
80+
]
81+
82+
7183
def get_expected_output(
7284
configuration_path: Union[str, Path], user_specific_path: Path
7385
) -> Tuple[int, str]:
7486
"""Get the expected output of a functional test."""
75-
76-
def get_related_files(
77-
tested_configuration_file: Union[str, Path], suffix_filter: str
78-
) -> List[Path]:
79-
conf_path = Path(tested_configuration_file)
80-
return [
81-
p
82-
for p in conf_path.parent.iterdir()
83-
if str(p.stem).startswith(conf_path.stem) and str(p).endswith(suffix_filter)
84-
]
85-
8687
exit_code = 0
8788
msg = (
8889
"we expect a single file of the form "

0 commit comments

Comments
 (0)