Coverage for tests/unit_tests/utils/test_apio_platforms.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.16.1, created at 2026-09-23 03:53 +0000

1""" 

2Tests of apio_platforms.py 

3""" 

4 

5from apio.utils import apio_platforms 

6 

7 

8def test_platforms(): 

9 """Sanity check the platforms list""" 

10 

11 # -- Get the (private) platform definitions list 

12 # platforms_list = apio_platforms._APIO_PLATFORMS_LIST 

13 

14 # -- Get the dict of ApioPlatform 

15 platforms_dict = apio_platforms.get_all_apio_platforms() 

16 

17 # -- Sanity check, sizes should be the same. 

18 # assert len(platforms_list) == len(platforms_dict) 

19 

20 # -- Verify that the keys match the ids. 

21 for platform_id, platform in platforms_dict.items(): 

22 

23 # -- The key should match the object's id field. 

24 assert platform_id == platform.id 

25 

26 # -- NOTE: Additional assertions are implemented in the ApioPlatform 

27 # -- class itself.