Skip to content

Commit

Permalink
finish refactor on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrozum committed Mar 8, 2024
1 parent 535ac4e commit 4c657e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/source_SCC_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_find_source_nodes():
assert source_nodes == ["source"]

perc_space = percolate_space(graph, {})
perc_bn = percolate_network(bn, perc_space, ctx=graph)
perc_bn = percolate_network(bn, perc_space, symbolic_network=graph)

source_nodes = find_source_nodes(perc_bn)

Expand Down
16 changes: 12 additions & 4 deletions tests/space_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,21 @@ def test_network_percolation():
)
graph = AsynchronousGraph(bn)

percolated_bn = percolate_network(bn, percolate_space(graph, {"c": 0}), ctx=graph)
percolated_bn = percolate_network(bn, percolate_space(graph, {"c": 0}), ctx=graph)
percolated_bn = percolate_network(
bn, percolate_space(graph, {"c": 0}), symbolic_network=graph
)
percolated_bn = percolate_network(
bn, percolate_space(graph, {"c": 0}), symbolic_network=graph
)
assert "false" == str(percolated_bn.get_update_function("c"))
assert "false" == str(percolated_bn.get_update_function("a"))
assert "true" == str(percolated_bn.get_update_function("b"))
percolated_bn = percolate_network(bn, percolate_space(graph, {"c": 1}), ctx=graph)
percolated_bn = percolate_network(bn, percolate_space(graph, {"c": 1}), ctx=graph)
percolated_bn = percolate_network(
bn, percolate_space(graph, {"c": 1}), symbolic_network=graph
)
percolated_bn = percolate_network(
bn, percolate_space(graph, {"c": 1}), symbolic_network=graph
)
assert "true" == str(percolated_bn.get_update_function("c"))
assert "b" == str(percolated_bn.get_update_function("a"))
assert "!a" == str(percolated_bn.get_update_function("b"))
Expand Down

1 comment on commit 4c657e6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
balm
   control.py1141488%102, 114, 120, 124, 129, 138–154, 472, 475, 488
   interaction_graph_utils.py30487%6–8, 145–146
   motif_avoidant.py148299%25, 171
   petri_net_translation.py1491193%22–26, 79, 136, 305–306, 330–331, 340, 449
   space_utils.py129497%25–27, 401, 448
   succession_diagram.py2571694%6, 184–189, 197, 257–258, 268, 274, 390, 580, 772, 810, 847
   symbolic_utils.py26388%10–12, 102
   trappist_core.py1833084%11–15, 52, 54, 89, 165, 212, 214, 216, 244–247, 251–253, 273–279, 337, 339, 369, 417, 419, 450, 502
balm/_sd_algorithms
   compute_attractor_seeds.py30197%8
   expand_attractor_seeds.py51590%6, 42, 97–102
   expand_bfs.py28196%6
   expand_dfs.py30197%6
   expand_minimal_spaces.py37295%6, 31
   expand_source_SCCs.py164696%19–21, 91, 101, 143, 287
   expand_to_target.py31390%6, 38, 43
TOTAL146810393% 

Tests Skipped Failures Errors Time
361 0 💤 0 ❌ 0 🔥 52.688s ⏱️

Please sign in to comment.