def test_entity_to_graph_class_hierarchy_whitelisted(self):

    class TestSubclass(training.Model):

        def __init__(self, y):
            super(TestSubclass, self).__init__()
            self.built = False

        def call(self, x):
            return (3 * x)
    program_ctx = self._simple_program_ctx()
    (nodes, name, _) = conversion.entity_to_graph(TestSubclass, program_ctx, None, None)
    class_node = nodes[(- 2)]
    self.assertEqual(name, 'TfTestSubclass')
    self.assertEqual(class_node.name, 'TfTestSubclass')
def test_entity_to_graph_class_hierarchy_whitelisted(self):

    class TestSubclass(training.Model):

        def __init__(self, y):
            super(TestSubclass, self).__init__()
            self.built = False

        def call(self, x):
            return (3 * x)
    program_ctx = self._simple_program_ctx()
    (nodes, name, _) = conversion.entity_to_graph(TestSubclass, program_ctx, None, None)
    class_node = nodes[(- 2)]
    self.assertEqual(name, 'TfTestSubclass')
    self.assertEqual(class_node.name, 'TfTestSubclass')