From 16c7e1e85b661fc97490c1f8022bce05b0bf31b6 Mon Sep 17 00:00:00 2001 From: Nigel Small Date: Tue, 9 Feb 2016 09:38:20 +0000 Subject: [PATCH] at_end()->at_end --- examples/test_examples.py | 4 ++-- neo4j/v1/session.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/test_examples.py b/examples/test_examples.py index 3f0611648..08c9e5482 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -151,7 +151,7 @@ def test_transaction_commit(self): cursor = session.run("MATCH (p:Person {name: 'The One'}) RETURN count(p)") assert cursor.next() assert cursor["count(p)"] == 1 - assert cursor.at_end() + assert cursor.at_end session.close() def test_transaction_rollback(self): @@ -165,7 +165,7 @@ def test_transaction_rollback(self): cursor = session.run("MATCH (p:Person {name: 'The One'}) RETURN count(p)") assert cursor.next() assert cursor["count(p)"] == 0 - assert cursor.at_end() + assert cursor.at_end session.close() def test_result_summary_query_profile(self): diff --git a/neo4j/v1/session.py b/neo4j/v1/session.py index 9cee9a388..8213ab395 100644 --- a/neo4j/v1/session.py +++ b/neo4j/v1/session.py @@ -176,6 +176,7 @@ def position(self): """ return self._position + @property def at_end(self): """ Return ``True`` if at the end of the record stream, ``False`` otherwise. @@ -186,7 +187,7 @@ def at_end(self): return True else: self._connection.fetch() - return self.at_end() + return self.at_end def stream(self): """ Yield all subsequent records.