Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: delete non cleaned up test dirs
  • Loading branch information
LennartPurucker committed Oct 16, 2024
commit d2bb5d3f679dbc81a68b57c132937fc06e075d85
10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import logging
import os
import shutil
from pathlib import Path
import pytest

Expand Down Expand Up @@ -164,6 +165,15 @@ def pytest_sessionfinish() -> None:
# Local file deletion
new_file_list = read_file_list()
compare_delete_files(file_list, new_file_list)

# Delete any test dirs that remain
# In edge cases due to a mixture of pytest parametrization and oslo concurrency,
# some file lock are created after leaving the test. This removes these files!
test_files_dir=Path(__file__).parent.parent / "openml"
for f in test_files_dir.glob("tests.*"):
if f.is_dir():
shutil.rmtree(f)

logger.info("Local files deleted")

logger.info(f"{worker} is killed")
Expand Down