Skip to content

Commit

Permalink
add test for z-score and participation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszgajewski committed Mar 26, 2024
1 parent fc876a8 commit d9e69fe
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/test_postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,39 @@ def test_network_metrics(self, postprocessing_object) -> None:
]
)

def test_compute_within_community_degree(self, postprocessing_object) -> None:
assert postprocessing_object.zscores is not None
assert len(postprocessing_object.zscores) == len(
postprocessing_object.scenarios
)
assert all(
[
isinstance(v, float)
for sc in postprocessing_object.zscores
for v in sc.values()
]
)

def test_compute_participation(self, postprocessing_object) -> None:
assert postprocessing_object.participation is not None
assert len(postprocessing_object.participation) == len(
postprocessing_object.scenarios
)
assert all(
[
isinstance(v, float)
for sc in postprocessing_object.participation
for v in sc.values()
]
)
assert all(
[
v >= 0.0 and v <= 1.0
for sc in postprocessing_object.participation
for v in sc.values()
]
)


def test_find_new_order() -> None:
"""
Expand Down

0 comments on commit d9e69fe

Please sign in to comment.