File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ def test_files_generated_by_templates_are_git_ignored():
10
10
pytest .skip ("Tests are not run from the source folder" )
11
11
12
12
base_dir = pathlib .Path (sklearn .__file__ ).parent
13
- ignored_files = open ( gitignore_file , "r" ). readlines ( )
14
- ignored_files = list ( map ( lambda line : line . strip ( " \n " ), ignored_files ))
13
+ ignored_files = gitignore_file . read_text (). split ( " \n " )
14
+ ignored_files = [ pathlib . Path ( line ) for line in ignored_files ]
15
15
16
16
for filename in base_dir .glob ("**/*.tp" ):
17
17
filename = filename .relative_to (base_dir .parent )
18
18
# From "path/to/template.p??.tp" to "path/to/template.p??"
19
19
filename_wo_tempita_suffix = filename .with_suffix ("" )
20
- assert str ( filename_wo_tempita_suffix ) in ignored_files
20
+ assert filename_wo_tempita_suffix in ignored_files
You can’t perform that action at this time.
0 commit comments