Skip to content

Commit 3df56b5

Browse files
committed
FIX TST Fix for #20996
Converting to string removed the windows compatible path.
1 parent 047cc2e commit 3df56b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sklearn/utils/tests/test_cython_templating.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ def test_files_generated_by_templates_are_git_ignored():
1111

1212
base_dir = pathlib.Path(sklearn.__file__).parent
1313
ignored_files = open(gitignore_file, "r").readlines()
14-
ignored_files = list(map(lambda line: line.strip("\n"), ignored_files))
14+
ignored_files = list(
15+
map(lambda line: pathlib.Path(line.strip("\n")), ignored_files)
16+
)
1517

1618
for filename in base_dir.glob("**/*.tp"):
1719
filename = filename.relative_to(base_dir.parent)
1820
# From "path/to/template.p??.tp" to "path/to/template.p??"
1921
filename_wo_tempita_suffix = filename.with_suffix("")
20-
assert str(filename_wo_tempita_suffix) in ignored_files
22+
assert filename_wo_tempita_suffix in ignored_files

0 commit comments

Comments
 (0)