@@ -134,6 +134,7 @@ def test_from_gds_integration_all_properties(gds: Any) -> None:
134
134
(2 , 0 , "REL" , "REL" , 3.0 , 2.5 ),
135
135
]
136
136
137
+
137
138
def test_from_gds_mocked (mocker : MockerFixture ) -> None :
138
139
from graphdatascience import Graph , GraphDataScience
139
140
@@ -195,14 +196,28 @@ def test_from_gds_mocked(mocker: MockerFixture) -> None:
195
196
G = Graph () # type: ignore[call-arg]
196
197
197
198
VG = from_gds (
198
- gds , G , size_property = "score" , additional_node_properties = ["component" , "score" ], node_radius_min_max = (3.14 , 1337 )
199
+ gds ,
200
+ G ,
201
+ size_property = "score" ,
202
+ additional_node_properties = ["component" , "score" ],
203
+ node_radius_min_max = (3.14 , 1337 ),
199
204
)
200
205
201
206
assert len (VG .nodes ) == 3
202
207
assert sorted (VG .nodes , key = lambda x : x .id ) == [
203
- Node (id = 0 , caption = "['A']" , size = float (1337 ), properties = dict (labels = ["A" ], component = float (1 ), score = float (1337 ))),
208
+ Node (
209
+ id = 0 ,
210
+ caption = "['A']" ,
211
+ size = float (1337 ),
212
+ properties = dict (labels = ["A" ], component = float (1 ), score = float (1337 )),
213
+ ),
204
214
Node (id = 1 , caption = "['C']" , size = float (42 ), properties = dict (labels = ["C" ], component = float (4 ), score = float (42 ))),
205
- Node (id = 2 , caption = "['A', 'B']" , size = float (3.14 ), properties = dict (labels = ["A" , "B" ], component = float (2 ), score = float (3.14 ))),
215
+ Node (
216
+ id = 2 ,
217
+ caption = "['A', 'B']" ,
218
+ size = float (3.14 ),
219
+ properties = dict (labels = ["A" , "B" ], component = float (2 ), score = float (3.14 )),
220
+ ),
206
221
]
207
222
208
223
assert len (VG .relationships ) == 3
0 commit comments