MCPcopy Create free account
hub / github.com/pytorch/pytorch / assertTensorDataAndNamesEqual

Method assertTensorDataAndNamesEqual

test/test_namedtensor.py:99–103  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

97 # TODO(rzou): Some form of this check should be added to self.assertEqual.
98 # Right now I don't know what it should look like.
99 def assertTensorDataAndNamesEqual(self, x, y):
100 self.assertEqual(x.names, y.names)
101 unnamed_x = x.rename(None)
102 unnamed_y = y.rename(None)
103 self.assertEqual(unnamed_x, unnamed_y)
104
105 def _test_factory(self, factory, device):
106 x = factory([], device=device)

Callers 3

_testMethod · 0.95
test_factory_coverageMethod · 0.95
test_align_tensorsMethod · 0.95

Calls 2

assertEqualMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected