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

Method testListWithEvictedSubclassClone

caffe2/python/schema_test.py:61–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 self.assertIsNot(clone, s)
60
61 def testListWithEvictedSubclassClone(self):
62 class Subclass(schema.ListWithEvicted):
63 pass
64
65 s = Subclass(schema.Scalar())
66 clone = s.clone()
67 self.assertIsInstance(clone, Subclass)
68 self.assertEqual(s, clone)
69 self.assertIsNot(clone, s)
70
71 def testStructSubclassClone(self):
72 class Subclass(schema.Struct):

Callers

nothing calls this directly

Calls 3

SubclassClass · 0.85
cloneMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected