You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix flaky test_remove_node_deletes_node surfaced by PyPy CI
mutate_delete_node invokes _prune_dangling_nodes after removing the
chosen hidden node, so any other hidden node that can no longer reach
an output is pruned along with its connections. The existing test
asserted an exact one-node reduction, which only held when the random
choice happened to pick a non-articulation node. Without a seed, the
outcome depends on hash randomization — about 30% flaky on CPython
and consistently failing on all four PyPy versions in GH Actions run
24268291745.
Relax the two tests in this file that assumed exact-count deletion
(test_remove_node_deletes_node and
test_remove_node_deletes_associated_connections), and add
test_remove_node_deletes_exactly_one which builds a genome by hand
with two parallel independent input->hidden->output paths so no
cascade is possible and the exact-one invariant can be checked
deterministically.
Verified: 15/15 PYTHONHASHSEED variations of the mutations test file
clean; full suite 630 passed / 6 skipped.
0 commit comments