MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / test_append

Method test_append

test/sot/test_mutable_data.py:281–285  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

279 )
280
281 def test_append(self):
282 data = [1, 2, 3]
283 var = ListVariable(data)
284 var.append(ConstVariable(4))
285 self.assertEqual(var.getitem(3), ConstVariable(4))
286
287 def test_extend(self):
288 data = [1, 2, 3]

Callers

nothing calls this directly

Calls 4

appendMethod · 0.95
getitemMethod · 0.95
ConstVariableClass · 0.85
ListVariableClass · 0.70

Tested by

no test coverage detected