Coverage for mlos_bench/mlos_bench/tests/tunables/test_empty_tunable_group.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-10-07 01:52 +0000

1# 

2# Copyright (c) Microsoft Corporation. 

3# Licensed under the MIT License. 

4# 

5"""Unit tests for empty tunable groups.""" 

6 

7from mlos_bench.tunables.tunable_groups import TunableGroups 

8 

9 

10def test_empty_tunable_group() -> None: 

11 """Test __nonzero__ property of tunable groups.""" 

12 tunable_groups = TunableGroups(config={}) 

13 assert not tunable_groups 

14 

15 

16def test_non_empty_tunable_group(tunable_groups: TunableGroups) -> None: 

17 """Test __nonzero__ property of tunable groups.""" 

18 assert tunable_groups