MCPcopy Create free account
hub / github.com/NVIDIA/DALI / test_converted_call_method

Method test_converted_call_method

dali/test/python/autograph/impl/test_api.py:331–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

329 self.assertEqual((1, 4, 3), self.evaluate(x))
330
331 def test_converted_call_method(self):
332 class TestClass(object):
333 def __init__(self, x):
334 self.x = x
335
336 def test_method(self):
337 if self.x < 0:
338 return -self.x
339 return self.x
340
341 tc = TestClass(custom_constant(-1))
342 x = api.converted_call(tc.test_method, (), None, options=DEFAULT_RECURSIVE)
343 self.assertEqual(1, self.evaluate(x))
344
345 def test_converted_call_synthetic_method(self):
346 class TestClass(object):

Callers

nothing calls this directly

Calls 3

evaluateMethod · 0.95
TestClassClass · 0.70
custom_constantFunction · 0.70

Tested by

no test coverage detected