lionagi 0.2.2__py3-none-any.whl → 0.2.4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- lionagi/core/engine/branch_engine.py +4 -4
- lionagi/integrations/provider/litellm.py +7 -5
- lionagi/tests/api/__init__.py +0 -0
- lionagi/tests/api/aws/__init__.py +0 -0
- lionagi/tests/api/aws/conftest.py +28 -0
- lionagi/tests/api/aws/test_aws_s3.py +7 -0
- lionagi/tests/test_core/generic/test_structure.py +194 -193
- lionagi/tests/test_core/graph/test_graph.py +71 -70
- lionagi/tests/test_core/graph/test_tree.py +76 -75
- lionagi/tests/test_core/mail/test_mail.py +98 -62
- lionagi/tests/test_core/test_structure/test_base_structure.py +198 -196
- lionagi/tests/test_core/test_structure/test_graph.py +55 -54
- lionagi/tests/test_core/test_structure/test_tree.py +49 -48
- lionagi/version.py +1 -1
- {lionagi-0.2.2.dist-info → lionagi-0.2.4.dist-info}/METADATA +7 -3
- {lionagi-0.2.2.dist-info → lionagi-0.2.4.dist-info}/RECORD +19 -15
- {lionagi-0.2.2.dist-info → lionagi-0.2.4.dist-info}/WHEEL +1 -1
- {lionagi-0.2.2.dist-info → lionagi-0.2.4.dist-info}/LICENSE +0 -0
- {lionagi-0.2.2.dist-info → lionagi-0.2.4.dist-info}/top_level.txt +0 -0
@@ -1,196 +1,198 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
1
|
+
#TODO
|
2
|
+
|
3
|
+
# import unittest
|
4
|
+
# from unittest.mock import MagicMock, patch
|
5
|
+
# from lionagi.core.tool.structure import *
|
6
|
+
#
|
7
|
+
#
|
8
|
+
# class TestBaseStructure(unittest.TestCase):
|
9
|
+
# def setUp(self):
|
10
|
+
# self.structure = BaseStructure()
|
11
|
+
# self.node1 = BaseNode(id_="node1")
|
12
|
+
# self.node2 = BaseNode(id_="node2")
|
13
|
+
# self.node3 = BaseNode(id_="node3")
|
14
|
+
# self.edge1 = Edge(id_="edge1", source_node_id="node1", target_node_id="node2")
|
15
|
+
# self.edge2 = Edge(id_="edge2", source_node_id="node2", target_node_id="node3")
|
16
|
+
#
|
17
|
+
# def test_node_edges_property(self):
|
18
|
+
# self.node1.in_relations = {"edge1": self.edge1}
|
19
|
+
# self.node1.out_relations = {"edge2": self.edge2}
|
20
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
21
|
+
# expected_result = {
|
22
|
+
# "node1": {"in": {"edge1": self.edge1}, "out": {"edge2": self.edge2}}
|
23
|
+
# }
|
24
|
+
# self.assertEqual(self.structure.node_edges, expected_result)
|
25
|
+
#
|
26
|
+
# def test_get_node_edges_with_node(self):
|
27
|
+
# self.node1.out_relations = {"edge1": self.edge1}
|
28
|
+
# self.node1.in_relations = {"edge2": self.edge2}
|
29
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
30
|
+
# self.assertEqual(
|
31
|
+
# self.structure.get_node_edges(self.node1, direction="out"), [self.edge1]
|
32
|
+
# )
|
33
|
+
# self.assertEqual(
|
34
|
+
# self.structure.get_node_edges(self.node1, direction="in"), [self.edge2]
|
35
|
+
# )
|
36
|
+
# self.assertEqual(
|
37
|
+
# self.structure.get_node_edges(self.node1, direction="all"),
|
38
|
+
# [self.edge2, self.edge1],
|
39
|
+
# )
|
40
|
+
#
|
41
|
+
# def test_get_node_edges_without_node(self):
|
42
|
+
# self.structure.structure_edges = {"edge1": self.edge1, "edge2": self.edge2}
|
43
|
+
# self.assertEqual(self.structure.get_node_edges(), [self.edge1, self.edge2])
|
44
|
+
#
|
45
|
+
# def test_get_node_edges_node_not_found(self):
|
46
|
+
# invalid_node = BaseNode(id_="invalid_node")
|
47
|
+
# try:
|
48
|
+
# self.structure.get_node_edges(invalid_node)
|
49
|
+
# except KeyError as e:
|
50
|
+
# self.assertEqual(str(e), f"node {invalid_node.id_} is not found")
|
51
|
+
#
|
52
|
+
# def test_has_structure_edge_with_edge_object(self):
|
53
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
54
|
+
# self.assertTrue(self.structure.has_structure_edge(self.edge1))
|
55
|
+
#
|
56
|
+
# def test_has_structure_edge_with_edge_id(self):
|
57
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
58
|
+
# self.assertTrue(self.structure.has_structure_edge("edge1"))
|
59
|
+
#
|
60
|
+
# def test_get_structure_edge_with_edge_object(self):
|
61
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
62
|
+
# self.assertEqual(self.structure.get_structure_edge(self.edge1), self.edge1)
|
63
|
+
#
|
64
|
+
# def test_get_structure_edge_with_edge_id(self):
|
65
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
66
|
+
# self.assertEqual(self.structure.get_structure_edge("edge1"), self.edge1)
|
67
|
+
#
|
68
|
+
# def test_add_structure_edge_success(self):
|
69
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
70
|
+
# self.structure.add_structure_edge(self.edge1)
|
71
|
+
# self.assertEqual(self.structure.structure_edges, {"edge1": self.edge1})
|
72
|
+
# self.assertEqual(self.node1.out_relations, {"node2": self.edge1})
|
73
|
+
# self.assertEqual(self.node2.in_relations, {"node1": self.edge1})
|
74
|
+
#
|
75
|
+
# def test_add_structure_edge_failure(self):
|
76
|
+
# with self.assertRaises(ValueError):
|
77
|
+
# self.structure.add_structure_edge(self.edge1)
|
78
|
+
#
|
79
|
+
# def test_remove_structure_edge_with_edge_object(self):
|
80
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
81
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
82
|
+
# self.node1.out_relations = {"node2": self.edge1}
|
83
|
+
# self.node2.in_relations = {"node1": self.edge1}
|
84
|
+
# self.structure.remove_structure_edge(self.edge1)
|
85
|
+
# self.assertEqual(self.structure.structure_edges, {})
|
86
|
+
# self.assertEqual(self.node1.out_relations, {})
|
87
|
+
# self.assertEqual(self.node2.in_relations, {})
|
88
|
+
#
|
89
|
+
# def test_remove_structure_edge_with_edge_id(self):
|
90
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
91
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
92
|
+
# self.node1.out_relations = {"node2": self.edge1}
|
93
|
+
# self.node2.in_relations = {"node1": self.edge1}
|
94
|
+
# self.structure.remove_structure_edge("edge1")
|
95
|
+
# self.assertEqual(self.structure.structure_edges, {})
|
96
|
+
# self.assertEqual(self.node1.out_relations, {})
|
97
|
+
# self.assertEqual(self.node2.in_relations, {})
|
98
|
+
#
|
99
|
+
# def test_remove_structure_node_success(self):
|
100
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
101
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
102
|
+
# self.node1.out_relations = {"node2": self.edge1}
|
103
|
+
# self.node2.in_relations = {"node1": self.edge1}
|
104
|
+
# self.structure.remove_structure_node(self.node1)
|
105
|
+
# self.assertEqual(self.structure.structure_nodes, {"node2": self.node2})
|
106
|
+
# self.assertEqual(self.structure.structure_edges, {})
|
107
|
+
#
|
108
|
+
# def test_remove_structure_node_failure(self):
|
109
|
+
# with self.assertRaises(ValueError):
|
110
|
+
# self.structure.remove_structure_node(self.node1)
|
111
|
+
#
|
112
|
+
# def test_add_structure_node_with_base_node(self):
|
113
|
+
# self.structure.add_structure_node(self.node1)
|
114
|
+
# self.assertEqual(self.structure.structure_nodes, {"node1": self.node1})
|
115
|
+
#
|
116
|
+
# def test_add_structure_node_with_list(self):
|
117
|
+
# self.structure.add_structure_node([self.node1, self.node2])
|
118
|
+
# self.assertEqual(
|
119
|
+
# self.structure.structure_nodes, {"node1": self.node1, "node2": self.node2}
|
120
|
+
# )
|
121
|
+
#
|
122
|
+
# def test_add_structure_node_with_dict(self):
|
123
|
+
# self.structure.add_structure_node({"node1": self.node1, "node2": self.node2})
|
124
|
+
# self.assertEqual(
|
125
|
+
# self.structure.structure_nodes, {"node1": self.node1, "node2": self.node2}
|
126
|
+
# )
|
127
|
+
#
|
128
|
+
# def test_add_structure_node_unsupported_type(self):
|
129
|
+
# with self.assertRaises(NotImplementedError):
|
130
|
+
# self.structure.add_structure_node(1)
|
131
|
+
#
|
132
|
+
# def test_get_structure_node_with_node_id(self):
|
133
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
134
|
+
# self.assertEqual(self.structure.get_structure_node("node1"), self.node1)
|
135
|
+
#
|
136
|
+
# def test_get_structure_node_with_base_node(self):
|
137
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
138
|
+
# self.assertEqual(self.structure.get_structure_node(self.node1), self.node1)
|
139
|
+
#
|
140
|
+
# def test_get_structure_node_with_list(self):
|
141
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
142
|
+
# self.assertEqual(
|
143
|
+
# self.structure.get_structure_node(["node1", "node2"]),
|
144
|
+
# [self.node1, self.node2],
|
145
|
+
# )
|
146
|
+
#
|
147
|
+
# def test_pop_structure_node_with_node_id(self):
|
148
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
149
|
+
# self.assertEqual(self.structure.pop_structure_node("node1"), self.node1)
|
150
|
+
# self.assertEqual(self.structure.structure_nodes, {})
|
151
|
+
#
|
152
|
+
# def test_pop_structure_node_with_base_node(self):
|
153
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
154
|
+
# self.assertEqual(self.structure.pop_structure_node(self.node1), self.node1)
|
155
|
+
# self.assertEqual(self.structure.structure_nodes, {})
|
156
|
+
#
|
157
|
+
# def test_pop_structure_node_with_list(self):
|
158
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
159
|
+
# self.assertEqual(
|
160
|
+
# self.structure.pop_structure_node(["node1", "node2"]),
|
161
|
+
# [self.node1, self.node2],
|
162
|
+
# )
|
163
|
+
# self.assertEqual(self.structure.structure_nodes, {})
|
164
|
+
#
|
165
|
+
# def test_pop_structure_node_unsupported_type(self):
|
166
|
+
# with self.assertRaises(NotImplementedError):
|
167
|
+
# self.structure.pop_structure_node(1)
|
168
|
+
#
|
169
|
+
# def test_has_structure_node_with_node_id(self):
|
170
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
171
|
+
# self.assertTrue(self.structure.has_structure_node("node1"))
|
172
|
+
# self.assertFalse(self.structure.has_structure_node("node2"))
|
173
|
+
#
|
174
|
+
# def test_has_structure_node_with_base_node(self):
|
175
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
176
|
+
# self.assertTrue(self.structure.has_structure_node(self.node1))
|
177
|
+
# self.assertFalse(self.structure.has_structure_node(self.node2))
|
178
|
+
#
|
179
|
+
# def test_has_structure_node_with_list(self):
|
180
|
+
# self.structure.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
181
|
+
# self.assertTrue(self.structure.has_structure_node(["node1", "node2"]))
|
182
|
+
# self.assertFalse(self.structure.has_structure_node(["node1", "node3"]))
|
183
|
+
#
|
184
|
+
# def test_is_empty_property(self):
|
185
|
+
# self.assertTrue(self.structure.is_empty)
|
186
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
187
|
+
# self.assertFalse(self.structure.is_empty)
|
188
|
+
#
|
189
|
+
# def test_clear_method(self):
|
190
|
+
# self.structure.structure_nodes = {"node1": self.node1}
|
191
|
+
# self.structure.structure_edges = {"edge1": self.edge1}
|
192
|
+
# self.structure.clear()
|
193
|
+
# self.assertEqual(self.structure.structure_nodes, {})
|
194
|
+
# self.assertEqual(self.structure.structure_edges, {})
|
195
|
+
#
|
196
|
+
#
|
197
|
+
# if __name__ == "__main__":
|
198
|
+
# unittest.main()
|
@@ -1,54 +1,55 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
from
|
4
|
-
from lionagi.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
1
|
+
#TODO
|
2
|
+
# import unittest
|
3
|
+
# from unittest.mock import MagicMock, patch
|
4
|
+
# from lionagi.core.generic import BaseNode, Edge
|
5
|
+
# from lionagi.new.schema.todo.graph import Graph
|
6
|
+
#
|
7
|
+
#
|
8
|
+
# class TestGraph(unittest.TestCase):
|
9
|
+
# def setUp(self):
|
10
|
+
# self.graph = Graph()
|
11
|
+
# self.node1 = BaseNode(id_="node1", content="Node 1")
|
12
|
+
# self.node2 = BaseNode(id_="node2", content="Node 2")
|
13
|
+
# self.edge1 = Edge(
|
14
|
+
# id_="edge1", source_node_id="node1", target_node_id="node2", label="Edge 1"
|
15
|
+
# )
|
16
|
+
# self.graph.structure_nodes = {"node1": self.node1, "node2": self.node2}
|
17
|
+
# self.graph.structure_edges = {"edge1": self.edge1}
|
18
|
+
#
|
19
|
+
# @patch("lionagi.libs.SysUtil.check_import")
|
20
|
+
# def test_to_networkx_success(self, mock_check_import):
|
21
|
+
# mock_check_import.return_value = None
|
22
|
+
# with patch("networkx.DiGraph") as mock_digraph:
|
23
|
+
# mock_graph = MagicMock()
|
24
|
+
# mock_digraph.return_value = mock_graph
|
25
|
+
#
|
26
|
+
# result = self.graph.to_networkx()
|
27
|
+
#
|
28
|
+
# self.assertEqual(result, mock_graph)
|
29
|
+
#
|
30
|
+
# @patch("lionagi.libs.SysUtil.check_import")
|
31
|
+
# def test_to_networkx_empty_graph(self, mock_check_import):
|
32
|
+
# mock_check_import.return_value = None
|
33
|
+
# with patch("networkx.DiGraph") as mock_digraph:
|
34
|
+
# mock_graph = MagicMock()
|
35
|
+
# mock_digraph.return_value = mock_graph
|
36
|
+
#
|
37
|
+
# self.graph.structure_nodes = {}
|
38
|
+
# self.graph.structure_edges = {}
|
39
|
+
# result = self.graph.to_networkx()
|
40
|
+
#
|
41
|
+
# self.assertEqual(result, mock_graph)
|
42
|
+
# mock_check_import.assert_called_once_with("networkx")
|
43
|
+
# mock_digraph.assert_called_once()
|
44
|
+
# mock_graph.add_node.assert_not_called()
|
45
|
+
# mock_graph.add_edge.assert_not_called()
|
46
|
+
#
|
47
|
+
# @patch("lionagi.libs.SysUtil.check_import", side_effect=ImportError)
|
48
|
+
# def test_to_networkx_import_error(self, mock_check_import):
|
49
|
+
# with self.assertRaises(ImportError):
|
50
|
+
# self.graph.to_networkx()
|
51
|
+
# mock_check_import.assert_called_once_with("networkx")
|
52
|
+
#
|
53
|
+
#
|
54
|
+
# if __name__ == "__main__":
|
55
|
+
# unittest.main()
|
@@ -1,48 +1,49 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
from lionagi.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
1
|
+
#TODO
|
2
|
+
# import unittest
|
3
|
+
# from lionagi.new.schema.todo.tree import Tree
|
4
|
+
# from lionagi.core.generic import TreeNode
|
5
|
+
#
|
6
|
+
#
|
7
|
+
# class TestTree(unittest.TestCase):
|
8
|
+
# def setUp(self):
|
9
|
+
# self.tree = Tree()
|
10
|
+
# self.node1 = TreeNode(id_="node1", content="Node 1")
|
11
|
+
# self.node2 = TreeNode(id_="node2", content="Node 2")
|
12
|
+
# self.node3 = TreeNode(id_="node3", content="Node 3")
|
13
|
+
# self.tree.add_structure_node(self.node1)
|
14
|
+
# self.tree.add_structure_node(self.node2)
|
15
|
+
# self.tree.add_structure_node(self.node3)
|
16
|
+
#
|
17
|
+
# def test_add_parent_to_child(self):
|
18
|
+
# self.tree.add_parent_to_child(self.node1, self.node2)
|
19
|
+
# self.assertEqual(self.node2, self.node1.parent)
|
20
|
+
# self.assertIn(self.node1, self.node2.children)
|
21
|
+
#
|
22
|
+
# def test_add_child_to_parent(self):
|
23
|
+
# self.tree.add_child_to_parent(self.node3, self.node2)
|
24
|
+
# self.assertEqual(self.node2, self.node3.parent)
|
25
|
+
# self.assertIn(self.node3, self.node2.children)
|
26
|
+
#
|
27
|
+
# def test_find_parent(self):
|
28
|
+
# self.tree.add_parent_to_child(self.node1, self.node2)
|
29
|
+
# parent = self.tree.find_parent(self.node1)
|
30
|
+
# self.assertEqual(self.node2, parent)
|
31
|
+
#
|
32
|
+
# def test_find_child(self):
|
33
|
+
# self.tree.add_parent_to_child(self.node1, self.node2)
|
34
|
+
# children = self.tree.find_child(self.node2)
|
35
|
+
# self.assertIn(self.node1, children)
|
36
|
+
#
|
37
|
+
# def test_parent_child_relationship(self):
|
38
|
+
# self.tree.add_parent_to_child(self.node1, self.node2)
|
39
|
+
# self.tree.add_child_to_parent(self.node3, self.node2)
|
40
|
+
# self.assertIn(self.node1, self.node2.children)
|
41
|
+
# self.assertIn(self.node3, self.node2.children)
|
42
|
+
# self.assertEqual(self.node2, self.node1.parent)
|
43
|
+
# self.assertEqual(self.node2, self.node3.parent)
|
44
|
+
#
|
45
|
+
# # Add more tests as necessary to cover edge cases and other functionalities
|
46
|
+
#
|
47
|
+
#
|
48
|
+
# if __name__ == "__main__":
|
49
|
+
# unittest.main()
|
lionagi/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.2.
|
1
|
+
__version__ = "0.2.4"
|