Coverage for tests/unit_tests/utils/test_apio_platforms.py: 100%
5 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-07 05:08 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-07 05:08 +0000
1# This file is part of the Apio project
2# (C) 2016-present FPGAwars
3# Project authors:
4# * Jesús Arroyo (Jesus89) (2016-2019)
5# * Juan Gonzalez (obijuan) (2019-2024)
6# * The Apio Team (2024-present)
7# License: GPLv2
9"""
10Tests of apio_platforms.py
11"""
13from apio.common import apio_platforms
16def test_platforms():
17 """Sanity check the platforms list"""
19 # -- Get the (private) platform definitions list
20 # platforms_list = apio_platforms._APIO_PLATFORMS_LIST
22 # -- Get the dict of ApioPlatform
23 platforms_dict = apio_platforms.get_apio_platforms()
25 # -- Sanity check, sizes should be the same.
26 # assert len(platforms_list) == len(platforms_dict)
28 # -- Verify that the keys match the ids.
29 for platform_id, platform in platforms_dict.items():
31 # -- The key should match the object's id field.
32 assert platform_id == platform.id
34 # -- NOTE: Additional assertions are implemented in the ApioPlatform
35 # -- class itself.