11"""Unit tests for utility function to check Llama Stack version."""
22
3+ from typing import Any
4+
35import pytest
6+
47from semver import Version
58from pytest_mock import MockerFixture
9+ from pytest_subtests import SubTests
610
711from llama_stack_client .types import VersionInfo
812
2024@pytest .mark .asyncio
2125async def test_check_llama_stack_version_minimal_supported_version (
2226 mocker : MockerFixture ,
23- ):
27+ ) -> None :
2428 """Test the check_llama_stack_version function."""
2529
2630 # mock the Llama Stack client
@@ -36,7 +40,7 @@ async def test_check_llama_stack_version_minimal_supported_version(
3640@pytest .mark .asyncio
3741async def test_check_llama_stack_version_maximal_supported_version (
3842 mocker : MockerFixture ,
39- ):
43+ ) -> None :
4044 """Test the check_llama_stack_version function."""
4145
4246 # mock the Llama Stack client
@@ -50,7 +54,9 @@ async def test_check_llama_stack_version_maximal_supported_version(
5054
5155
5256@pytest .mark .asyncio
53- async def test_check_llama_stack_version_too_small_version (mocker : MockerFixture ):
57+ async def test_check_llama_stack_version_too_small_version (
58+ mocker : MockerFixture ,
59+ ) -> None :
5460 """Test the check_llama_stack_version function."""
5561
5662 # mock the Llama Stack client
@@ -68,7 +74,7 @@ async def test_check_llama_stack_version_too_small_version(mocker: MockerFixture
6874 await check_llama_stack_version (mock_client )
6975
7076
71- async def _check_version_must_fail (mock_client , bigger_version ) :
77+ async def _check_version_must_fail (mock_client : Any , bigger_version : Version ) -> None :
7278 mock_client .inspect .version .return_value = VersionInfo (version = str (bigger_version ))
7379
7480 expected_exception_msg = (
@@ -81,7 +87,9 @@ async def _check_version_must_fail(mock_client, bigger_version):
8187
8288
8389@pytest .mark .asyncio
84- async def test_check_llama_stack_version_too_big_version (mocker , subtests ):
90+ async def test_check_llama_stack_version_too_big_version (
91+ mocker : MockerFixture , subtests : SubTests
92+ ) -> None :
8593 """Test the check_llama_stack_version function."""
8694
8795 # mock the Llama Stack client
0 commit comments