@@ -212,7 +212,7 @@ def test_can_obtain_summary_after_consuming_result(self):
212
212
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
213
213
cursor = session .run ("CREATE (n) RETURN n" )
214
214
list (cursor .stream ())
215
- summary = cursor .summary ()
215
+ summary = cursor .summary
216
216
assert summary .statement == "CREATE (n) RETURN n"
217
217
assert summary .parameters == {}
218
218
assert summary .statement_type == "rw"
@@ -222,12 +222,12 @@ def test_cannot_obtain_summary_without_consuming_result(self):
222
222
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
223
223
cursor = session .run ("CREATE (n) RETURN n" )
224
224
with self .assertRaises (ResultError ):
225
- _ = cursor .summary ()
225
+ _ = cursor .summary
226
226
227
227
# def test_can_obtain_summary_immediately_if_empty_result(self):
228
228
# with GraphDatabase.driver("bolt://localhost").session() as session:
229
229
# cursor = session.run("CREATE (n)")
230
- # summary = cursor.summary()
230
+ # summary = cursor.summary
231
231
# assert summary.statement == "CREATE (n)"
232
232
# assert summary.parameters == {}
233
233
# assert summary.statement_type == "rw"
@@ -237,14 +237,14 @@ def test_no_plan_info(self):
237
237
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
238
238
cursor = session .run ("CREATE (n) RETURN n" )
239
239
list (cursor .stream ())
240
- assert cursor .summary () .plan is None
241
- assert cursor .summary () .profile is None
240
+ assert cursor .summary .plan is None
241
+ assert cursor .summary .profile is None
242
242
243
243
def test_can_obtain_plan_info (self ):
244
244
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
245
245
cursor = session .run ("EXPLAIN CREATE (n) RETURN n" )
246
246
list (cursor .stream ())
247
- plan = cursor .summary () .plan
247
+ plan = cursor .summary .plan
248
248
assert plan .operator_type == "ProduceResults"
249
249
assert plan .identifiers == ["n" ]
250
250
assert plan .arguments == {"planner" : "COST" , "EstimatedRows" : 1.0 , "version" : "CYPHER 3.0" ,
@@ -256,7 +256,7 @@ def test_can_obtain_profile_info(self):
256
256
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
257
257
cursor = session .run ("PROFILE CREATE (n) RETURN n" )
258
258
list (cursor .stream ())
259
- profile = cursor .summary () .profile
259
+ profile = cursor .summary .profile
260
260
assert profile .db_hits == 0
261
261
assert profile .rows == 1
262
262
assert profile .operator_type == "ProduceResults"
@@ -270,14 +270,14 @@ def test_no_notification_info(self):
270
270
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
271
271
cursor = session .run ("CREATE (n) RETURN n" )
272
272
list (cursor .stream ())
273
- notifications = cursor .summary () .notifications
273
+ notifications = cursor .summary .notifications
274
274
assert notifications == []
275
275
276
276
def test_can_obtain_notification_info (self ):
277
277
with GraphDatabase .driver ("bolt://localhost" ).session () as session :
278
278
cursor = session .run ("EXPLAIN MATCH (n), (m) RETURN n, m" )
279
279
list (cursor .stream ())
280
- notifications = cursor .summary () .notifications
280
+ notifications = cursor .summary .notifications
281
281
282
282
assert len (notifications ) == 1
283
283
notification = notifications [0 ]
0 commit comments