def test_code(self): answer = get_source_code(StaticCode.dyfunc_assign) program_translator = ProgramTranslator() code = program_translator.get_code(dyfunc_assign) self.assertEqual(answer, code)
def _get_answer_code(self): return get_source_code(self.answer_func)
def _get_transformed_code(self): transformed_func = _jst.convert_call(self.func) return get_source_code(transformed_func)
def _get_transformed_code(self): transformed_func = paddle.jit.dy2static.convert_call(self.func) return get_source_code(transformed_func)