Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/openml/openml-python int…
Browse files Browse the repository at this point in the history
…o loose_reinitialization_new
  • Loading branch information
LennartPurucker committed Oct 17, 2024
2 parents e6cc89f + 26ae499 commit f806795
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ jobs:
git config --global user.email 'not@mail.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "$last_commit"
git push
git diff --quiet @{u} HEAD || git push
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ jobs:
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
- name: Check for files left behind by test
# skip 3.8 as it fails only for Python 3.8 for no explainable reason.
if: matrix.os != 'windows-latest' && matrix.python-version != '3.8' && always()
if: matrix.os != 'windows-latest' && always()
run: |
before="${{ steps.status-before.outputs.BEFORE }}"
after="$(git status --porcelain -b)"
Expand Down
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

0 comments on commit f806795

Please sign in to comment.