You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
516 B
22 lines
516 B
import shutil
|
|
import tempfile
|
|
import pytest
|
|
from gpustack.config.config import Config, set_global_config
|
|
|
|
|
|
@pytest.fixture(scope="module", autouse=True)
|
|
def temp_dir():
|
|
tmp_dir = tempfile.mkdtemp()
|
|
print(f"Created temporary directory: {tmp_dir}")
|
|
yield tmp_dir
|
|
shutil.rmtree(tmp_dir)
|
|
|
|
|
|
@pytest.fixture(scope="module", autouse=True)
|
|
def config(temp_dir):
|
|
cfg = Config(
|
|
token="test", jwt_secret_key="test", data_dir=temp_dir, enable_ray=True
|
|
)
|
|
set_global_config(cfg)
|
|
return cfg
|