Coverage for tests/unit_tests/utils/test_apio_platforms.py: 100%
7 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-09 01:55 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-09 01:55 +0000
1"""
2Tests of apio_platforms.py
3"""
5from apio.utils import apio_platforms
8def test_platforms():
9 """Sanity check the platforms list"""
11 # pylint: disable=protected-access
13 # -- Get the (private) platform definitions list
14 platforms_list = apio_platforms._SUPPORTED_PLATFORMS
16 # -- Get the dict of ApioPlatform
17 platforms_dict = apio_platforms.get_all_apio_platforms()
19 # -- Sanity check, sizes should be the same.
20 assert len(platforms_list) == len(platforms_dict)
22 # -- Test each ApioPlatform
23 for platform_id, platform in platforms_dict.items():
25 # -- The key should match the object's id field.
26 assert platform_id == platform.id
28 # -- NOTE: Additional assertions are implemented in the ApioPlatform
29 # -- class itself.