mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-10 04:08:31 +00:00
comments
This commit is contained in:
parent
4948cda0da
commit
e955ccbd4f
1 changed files with 6 additions and 6 deletions
|
@ -17,13 +17,13 @@ import pytest
|
|||
|
||||
|
||||
@pytest.fixture
|
||||
def test_dataset(llama_stack_client):
|
||||
register_dataset(llama_stack_client)
|
||||
yield # This is where the test function will run
|
||||
|
||||
def dataset_for_test(llama_stack_client):
|
||||
dataset_id = "test_dataset"
|
||||
register_dataset(llama_stack_client, dataset_id=dataset_id)
|
||||
yield
|
||||
# Teardown - this always runs, even if the test fails
|
||||
try:
|
||||
llama_stack_client.datasets.unregister("test_dataset")
|
||||
llama_stack_client.datasets.unregister(dataset_id)
|
||||
except Exception as e:
|
||||
print(f"Warning: Failed to unregister test_dataset: {e}")
|
||||
|
||||
|
@ -94,7 +94,7 @@ def test_register_unregister_dataset(llama_stack_client):
|
|||
assert len(response) == 0
|
||||
|
||||
|
||||
def test_get_rows_paginated(llama_stack_client, test_dataset):
|
||||
def test_get_rows_paginated(llama_stack_client, dataset_for_test):
|
||||
response = llama_stack_client.datasetio.get_rows_paginated(
|
||||
dataset_id="test_dataset",
|
||||
rows_in_page=3,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue