Download llama.cpp/examples/server/tests/conftest.py from Mat17892/iris: direct link, hf CLI and curl.
- Browser
- Download file 449 Bytes
-
https://huggingface.co/spaces/Mat17892/iris/resolve/main/llama.cpp/examples/server/tests/conftest.py
- Command line
-
hf download hf://spaces/Mat17892/iris/llama.cpp/examples/server/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/Mat17892/iris/resolve/main/llama.cpp/examples/server/tests/conftest.py
449 Bytes
| import pytest | |
| from utils import * | |
| # ref: https://stackoverflow.com/questions/22627659/run-code-before-and-after-each-test-in-py-test | |
| def stop_server_after_each_test(): | |
| # do nothing before each test | |
| yield | |
| # stop all servers after each test | |
| instances = set( | |
| server_instances | |
| ) # copy the set to prevent 'Set changed size during iteration' | |
| for server in instances: | |
| server.stop() | |