Skip to content

Commit ad5c48d

Browse files
Copilotfermga
andcommitted
Fix integration test import after removing compute_global_coherence
Updated test_remesh_operator_integration.py to use centralized compute_coherence from tnfr.metrics.common instead of removed compute_global_coherence function. All 101 REMESH tests now passing. Co-authored-by: fermga <203334638+fermga@users.noreply.github.com>
1 parent c21a32b commit ad5c48d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unit/operators/test_remesh_operator_integration.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
from tnfr.operators.remesh import (
1616
StructuralIdentity,
1717
structural_similarity,
18-
compute_global_coherence,
1918
)
19+
from tnfr.metrics.common import compute_coherence
2020
from tnfr.alias import get_attr, set_attr
2121
from tnfr.constants import inject_defaults
2222
from tnfr.constants.aliases import ALIAS_EPI, ALIAS_VF, ALIAS_DNFR, ALIAS_THETA
@@ -36,15 +36,16 @@ def test_remesh_with_IL_hierarchical(self):
3636
set_attr(G.nodes[1], ALIAS_VF, 1.0)
3737
set_attr(G.nodes[node if "node" in locals() else 1], ALIAS_THETA, 1.0)
3838
set_attr(G.nodes[1], ALIAS_THETA, 1.0)
39+
set_attr(G.nodes[1], ALIAS_DNFR, 0.1) # Set ΔNFR for coherence calc
3940

4041
# Capture identity before
4142
identity_before = StructuralIdentity.capture_from_node(G.nodes[1])
4243

4344
# Apply REMESH → IL sequence
4445
run_sequence(G, 1, [Recursivity(), Coherence()])
4546

46-
# Verify coherence increased (IL effect)
47-
coherence = compute_global_coherence(G)
47+
# Verify coherence increased (IL effect) using canonical function
48+
coherence = compute_coherence(G)
4849
assert coherence > 0.5 # Should be stabilized
4950

5051
# Verify identity preserved

0 commit comments

Comments
 (0)