Skip to content

Commit 6abbbe0

Browse files
committed
Removed cursor.position (enumerate is idiomatic)
1 parent f0bc67e commit 6abbbe0

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

neo4j/v1/session.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,6 @@ def close(self):
198198
self._consume()
199199
self._connection = None
200200

201-
@property
202-
def position(self):
203-
""" Return the current cursor position.
204-
"""
205-
return self._position
206-
207201
@property
208202
def at_end(self):
209203
""" Return ``True`` if at the end of the record stream, ``False``

test/test_session.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ class RunTestCase(ServerTestCase):
126126

127127
def test_can_run_simple_statement(self):
128128
session = GraphDatabase.driver("bolt://localhost", auth=auth_token).session()
129-
count = 0
130129
result = session.run("RETURN 1 AS n")
131-
assert result.position == -1
132130
for record in result:
133131
assert record[0] == 1
134132
assert record["n"] == 1
@@ -141,10 +139,7 @@ def test_can_run_simple_statement(self):
141139
_ = record[object()]
142140
assert repr(record)
143141
assert len(record) == 1
144-
assert result.position == count
145-
count += 1
146142
session.close()
147-
assert count == 1
148143

149144
def test_can_run_simple_statement_with_params(self):
150145
session = GraphDatabase.driver("bolt://localhost", auth=auth_token).session()

0 commit comments

Comments
 (0)