def test_ag_module_cached(self):

    def callee():
        return range(3)

    def caller(a):
        return a()
    program_ctx = self._simple_program_ctx()
    (_, _, callee_ns) = conversion.entity_to_graph(callee, program_ctx, None, None)
    (_, _, caller_ns) = conversion.entity_to_graph(caller, program_ctx, None, None)
    self.assertTrue((callee_ns['ag__'] is caller_ns['ag__']))
def test_ag_module_cached(self):

    def callee():
        return range(3)

    def caller(a):
        return a()
    program_ctx = self._simple_program_ctx()
    (_, _, callee_ns) = conversion.entity_to_graph(callee, program_ctx, None, None)
    (_, _, caller_ns) = conversion.entity_to_graph(caller, program_ctx, None, None)
    self.assertTrue((callee_ns['ag__'] is caller_ns['ag__']))