MCPcopy Create free account
hub / github.com/apache/tvm-ffi / test_equal_content

Method test_equal_content

tests/python/test_structural_py_class.py:222–227  ·  view source on GitHub ↗

Two tree nodes with identical content are structurally equal.

(self)

Source from the content-addressed store, hash-verified

220 """Test structural_eq="tree" kind."""
221
222 def test_equal_content(self) -> None:
223 """Two tree nodes with identical content are structurally equal."""
224 a = TExpr(value=42)
225 b = TExpr(value=42)
226 assert structural_equal(a, b)
227 assert structural_hash(a) == structural_hash(b)
228
229 def test_different_content(self) -> None:
230 """Two tree nodes with different content are not equal."""

Callers

nothing calls this directly

Calls 3

structural_equalFunction · 0.90
structural_hashFunction · 0.90
TExprClass · 0.85

Tested by

no test coverage detected