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

Method test_pop

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

Source from the content-addressed store, hash-verified

292 self.assertEqual(var.getitem(4), ConstVariable(5))
293
294 def test_pop(self):
295 data = [1, 2, 3]
296 var = ListVariable(data)
297 self.assertEqual(var.pop(), ConstVariable(3))
298 self.assertEqual(var.pop(0), ConstVariable(1))
299
300 def test_clear(self):
301 data = [1, 2, 3]

Callers

nothing calls this directly

Calls 3

popMethod · 0.95
ConstVariableClass · 0.85
ListVariableClass · 0.70

Tested by

no test coverage detected