KBaba7/llama.cpp
0
1import pytest2from utils import *3 4 5# ref: https://stackoverflow.com/questions/22627659/run-code-before-and-after-each-test-in-py-test6@pytest.fixture(autouse=True)7def stop_server_after_each_test():8 # do nothing before each test9 yield10 # stop all servers after each test11 instances = set(12 server_instances13 ) # copy the set to prevent 'Set changed size during iteration'14 for server in instances:15 server.stop()16 