mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 14:08:00 +00:00
t fix(ci): allow tests to skip llama stack client instantiation
This commit is contained in:
parent
dfce05d0c5
commit
f0e9d78099
3 changed files with 19 additions and 7 deletions
|
@ -23,7 +23,7 @@
|
|||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"framer-motion": "^11.18.2",
|
||||
"llama-stack-client": ""0.2.17",
|
||||
"llama-stack-client": "^0.2.17",
|
||||
"lucide-react": "^0.510.0",
|
||||
"next": "15.3.3",
|
||||
"next-auth": "^4.24.11",
|
||||
|
|
|
@ -36,12 +36,15 @@ def pytest_sessionstart(session):
|
|||
|
||||
# pull client instantiation to session start so all the complex logs during initialization
|
||||
# don't clobber the test one-liner outputs
|
||||
print("instantiating llama_stack_client")
|
||||
start_time = time.time()
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
session._llama_stack_client = instantiate_llama_stack_client(session)
|
||||
print(f"llama_stack_client instantiated in {time.time() - start_time:.3f}s")
|
||||
|
||||
if not getattr(session.config, "skip_llama_stack_client_instantiation", False):
|
||||
print("instantiating llama_stack_client")
|
||||
start_time = time.time()
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
session._llama_stack_client = instantiate_llama_stack_client(session)
|
||||
print(f"llama_stack_client instantiated in {time.time() - start_time:.3f}s")
|
||||
|
||||
|
||||
def pytest_runtest_teardown(item):
|
||||
|
|
9
tests/integration/providers/utils/sqlstore/conftest.py
Normal file
9
tests/integration/providers/utils/sqlstore/conftest.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
config.skip_llama_stack_client_instantiation = True
|
Loading…
Add table
Add a link
Reference in a new issue