Coverage for tests / unit / utils / unified_config / test_enums.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-04-03 18:53 +0000

1"""Tests for ToolOrderStrategy enum.""" 

2 

3from __future__ import annotations 

4 

5import pytest 

6from assertpy import assert_that 

7 

8from lintro.utils.unified_config import ToolOrderStrategy 

9 

10 

11@pytest.mark.parametrize( 

12 ("strategy", "expected_value"), 

13 [ 

14 (ToolOrderStrategy.PRIORITY, "priority"), 

15 (ToolOrderStrategy.ALPHABETICAL, "alphabetical"), 

16 (ToolOrderStrategy.CUSTOM, "custom"), 

17 ], 

18 ids=["priority", "alphabetical", "custom"], 

19) 

20def test_tool_order_strategy_enum_values( 

21 strategy: ToolOrderStrategy, 

22 expected_value: str, 

23) -> None: 

24 """Verify ToolOrderStrategy enum members have expected string values. 

25 

26 Args: 

27 strategy: Configuration strategy. 

28 expected_value: Expected value. 

29 """ 

30 assert_that(strategy.value).is_equal_to(expected_value) 

31 

32 

33def test_tool_order_strategy_is_str_enum() -> None: 

34 """Verify ToolOrderStrategy members can be used as strings.""" 

35 assert_that(ToolOrderStrategy.PRIORITY).is_equal_to("priority") 

36 assert_that(str(ToolOrderStrategy.ALPHABETICAL)).is_equal_to("alphabetical")