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

7 statements  

« prev     ^ index     » next       coverage.py v7.5.1, created at 2024-05-06 00:35 +0000

1# 

2# Copyright (c) Microsoft Corporation. 

3# Licensed under the MIT License. 

4# 

5""" 

6Unit tests for empty tunable groups. 

7""" 

8 

9from mlos_bench.tunables.tunable_groups import TunableGroups 

10 

11 

12def test_empty_tunable_group() -> None: 

13 """ 

14 Test __nonzero__ property of tunable groups. 

15 """ 

16 tunable_groups = TunableGroups(config={}) 

17 assert not tunable_groups 

18 

19 

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

21 """ 

22 Test __nonzero__ property of tunable groups. 

23 """ 

24 assert tunable_groups