Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nutkit/protocol/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ class Feature(Enum):
# The result summary provides a way to access the transaction's
# GqlStatusObject.
API_SUMMARY_GQL_STATUS_OBJECTS = "Feature:API:Summary:GqlStatusObjects"
# The profile in the summary provides a way to discern absent values for
# fields `rows`, `dbHits`, `time`, and `pageCacheHits`.
API_SUMMARY_PROFILE_OPTIONAL_STATS = \
"Feature:API:Summary:Profile:OptionalStats"
# The driver supports sending and receiving geospatial data types.
API_TYPE_SPATIAL = "Feature:API:Type.Spatial"
# The driver supports sending and receiving temporal data types.
Expand Down
2 changes: 1 addition & 1 deletion tests/neo4j/test_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_can_obtain_profile_info(self):
def test_no_notification_info(self):
summary = self.get_summary("CREATE (n) RETURN n")
notifications = summary.notifications
self.assertTrue(notifications is None or summary.notifications == [])
self.assertIn(notifications, (None, []))

def _test_status(self, query, expected_code):
summary = self.get_summary(query)
Expand Down
1 change: 1 addition & 0 deletions tests/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def get_driver_name():
class TestkitTestCase(unittest.TestCase):

required_features = ()
maxDiff = None

def setUp(self):
super().setUp()
Expand Down
23 changes: 23 additions & 0 deletions tests/stub/summary/scripts/v6x0/summary_with_plan.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
!: BOLT 6.0

A: HELLO {"{}": "*"}
A: LOGON {"{}": "*"}
*: RESET
C: RUN "*" "*" "*"
S: SUCCESS {"t_first": 2001, "fields": ["n"]}
{{
{+
C: PULL {"n": 1}
S: RECORD [1]
S: SUCCESS {"has_more": true}
+}
C: DISCARD {"n": -1}
----
C: PULL {"n": "*"}
S: RECORD [1]
----
C: DISCARD {"n": -1}
}}
S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "plan": #PLAN#}
*: RESET
?: GOODBYE
23 changes: 23 additions & 0 deletions tests/stub/summary/scripts/v6x0/summary_with_profile.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
!: BOLT 6.0

A: HELLO {"{}": "*"}
A: LOGON {"{}": "*"}
*: RESET
C: RUN "*" "*" "*"
S: SUCCESS {"t_first": 2001, "fields": ["n"]}
{{
{+
C: PULL {"n": 1}
S: RECORD [1]
S: SUCCESS {"has_more": true}
+}
C: DISCARD {"n": -1}
----
C: PULL {"n": "*"}
S: RECORD [1]
----
C: DISCARD {"n": -1}
}}
S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "profile": #PROFILE#}
*: RESET
?: GOODBYE
Loading