File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed
Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 9191 if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
9292 # Most of the time, running only the scikit-learn tests is sufficient
9393 if [ ${{ matrix.sklearn-only }} = 'true' ]; then sklearn='-m sklearn'; fi
94- echo pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov $sklearn --reruns 5 --reruns-delay 1
95- pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov $sklearn --reruns 5 --reruns-delay 1
94+ echo pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov $sklearn --reruns 5 --reruns-delay 1 -o log_cli=true
95+ pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov $sklearn --reruns 5 --reruns-delay 1 -o log_cli=true
9696 - name : Run tests on Windows
9797 if : matrix.os == 'windows-latest'
9898 run : | # we need a separate step because of the bash-specific if-statement in the previous one.
Original file line number Diff line number Diff line change 2424
2525import os
2626import logging
27+ import pathlib
2728from typing import List
2829import pytest
2930
@@ -51,26 +52,20 @@ def worker_id() -> str:
5152 return "master"
5253
5354
54- def read_file_list () -> List [str ]:
55+ def read_file_list () -> List [pathlib . Path ]:
5556 """Returns a list of paths to all files that currently exist in 'openml/tests/files/'
5657
57- :return: List[str ]
58+ :return: List[pathlib.Path ]
5859 """
59- this_dir = os .path .abspath (os .path .dirname (os .path .abspath (__file__ )))
60- directory = os .path .join (this_dir , ".." )
61- logger .info ("Collecting file lists from: {}" .format (directory ))
62- file_list = []
63- for root , _ , filenames in os .walk (directory ):
64- for filename in filenames :
65- file_list .append (os .path .join (root , filename ))
66- return file_list
60+ test_files_dir = pathlib .Path (__file__ ).parent / "files"
61+ return [f for f in test_files_dir .rglob ("*" ) if f .is_file ()]
6762
6863
69- def compare_delete_files (old_list , new_list ) -> None :
64+ def compare_delete_files (old_list : List [ pathlib . Path ] , new_list : List [ pathlib . Path ] ) -> None :
7065 """Deletes files that are there in the new_list but not in the old_list
7166
72- :param old_list: List[str ]
73- :param new_list: List[str ]
67+ :param old_list: List[pathlib.Path ]
68+ :param new_list: List[pathlib.Path ]
7469 :return: None
7570 """
7671 file_list = list (set (new_list ) - set (old_list ))
You can’t perform that action at this time.
0 commit comments