Skip to content

Commit

Permalink
add onnx mark to integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoeller authored and eavanvalkenburg committed Dec 19, 2024
1 parent f56a996 commit 1af0272
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ filterwarnings = [
]
timeout = 120
markers = [
"ollama: mark a test as requiring the Ollama service (use \"not ollama\" to skip those tests)"
"ollama: mark a test as requiring the Ollama service (use \"not ollama\" to skip those tests)",
"onnx: mark a test as requiring the Onnx service (use \"not onnx\" to skip those tests)"
]

[tool.ruff]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
ChatMessageContent(role=AuthorRole.USER, items=[TextContent(text="Where was it made?")]),
],
{},
marks=pytest.mark.skipif(not onnx_setup, reason="Need a Onnx Model setup"),
marks=(
pytest.mark.skipif(not onnx_setup, reason="Need a Onnx Model setup"),
pytest.mark.onnx,
),
id="onnx_gen_ai_image_input_file",
),
pytest.param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ class Reasoning(KernelBaseModel):
ChatMessageContent(role=AuthorRole.USER, items=[TextContent(text="How are you today?")]),
],
{},
marks=pytest.mark.skipif(not onnx_setup, reason="Need a Onnx Model setup"),
marks=(
pytest.mark.skipif(not onnx_setup, reason="Need a Onnx Model setup"),
pytest.mark.onnx,
),
id="onnx_gen_ai",
),
# endregion
Expand Down
5 changes: 4 additions & 1 deletion python/tests/integration/completions/test_text_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@
{},
["<|user|>Repeat the word Hello<|end|><|assistant|>"],
{},
marks=pytest.mark.skipif(not onnx_setup, reason="Need local Onnx setup"),
marks=(
pytest.mark.skipif(not onnx_setup, reason="Need a Onnx Model setup"),
pytest.mark.onnx,
),
id="onnx_gen_ai_text_completion",
),
pytest.param(
Expand Down

0 comments on commit 1af0272

Please sign in to comment.