Spaces:
Running
Running
Download lichess-bot-master/test_bot/conftest.py from BlueMoonBot/bot: direct link, hf CLI and curl.
- Browser
- Download file 514 Bytes
-
https://huggingface.co/spaces/BlueMoonBot/bot/resolve/main/lichess-bot-master/test_bot/conftest.py
- Command line
-
hf download hf://spaces/BlueMoonBot/bot/lichess-bot-master/test_bot/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/BlueMoonBot/bot/resolve/main/lichess-bot-master/test_bot/conftest.py
514 Bytes
| """Remove files created when testing lichess-bot.""" | |
| import shutil | |
| import os | |
| from _pytest.config import ExitCode | |
| from _pytest.main import Session | |
| def pytest_sessionfinish(session: Session, exitstatus: int | ExitCode) -> None: # noqa: ARG001 | |
| """ | |
| Remove files created when testing lichess-bot. | |
| The only exception is if running in a GitHub action, in which case we save the engines to the cache. | |
| """ | |
| if os.path.exists("TEMP") and not os.getenv("GITHUB_ACTIONS"): | |
| shutil.rmtree("TEMP") | |