MCPcopy Create free account
hub / github.com/pytorch/executorch / test_treespec_equality

Method test_treespec_equality

extension/pytree/test/test.py:118–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

116 self.assertEqual(struct_map, (2, 4, [6, 8]))
117
118 def test_treespec_equality(self):
119 self.assertTrue(TreeSpec.from_str("$") == TreeSpec.from_str("$"))
120 self.assertTrue(_spec([1]) == TreeSpec.from_str("L1#1($)"))
121 self.assertTrue(_spec((1)) != _spec([1]))
122 self.assertTrue(_spec((1)) == _spec((2)))
123
124 def test_flatten_unflatten_leaf(self):
125 def run_test_with_leaf(leaf):

Callers

nothing calls this directly

Calls 1

_specFunction · 0.85

Tested by

no test coverage detected