Skip to content

Commit

Permalink
Add test for complexity calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
vanous committed Dec 4, 2024
1 parent 0f6219c commit 2cf9532
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ def test_get_geometries(pygdtf_module):
fixture = pygdtf_module.FixtureType(dsc_file=test_fixture_test_file)
geometries = pygdtf_module.utils.get_used_geometries(fixture)
assert set(test_result) == set(geometries)


def test_calculate_complexity_total(pygdtf_module, gdtf_fixture):
"""Test calculation"""
total_complexity = pygdtf_module.utils.calculate_complexity(gdtf_fixture)["total"]
assert 89 == total_complexity

0 comments on commit 2cf9532

Please sign in to comment.