def test_bool_to_str(self): graph = build_graph(nodes_attributes, [('input', 'pool_1'), ('pool_1', 'output'), ('output', 'op_output')], {'pool_1': { 'bool_attr': None }}) pool_1_node = Node(graph, 'pool_1') attrs = [(True, 'true'), (False, 'false'), (1, 'true'), (0, 'false')] for attr in attrs: pool_1_node.bool_attr = attr[0] self.assertEqual(attr[1], bool_to_str(pool_1_node, 'bool_attr'))