Skip to content

Commit ac65f57

Browse files
committed
Clear comments about added_triple
1 parent 2746379 commit ac65f57

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

terminusdb_client/tests/test_woql_cursor_management.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,18 @@ def test_cursor_reset_with_subquery(self):
181181
assert query._cursor == {}
182182
assert query._cursor is not query._query
183183

184-
184+
def test_cursor_tracking_with_update_operations(self):
185+
"""Test cursor tracking with update operations."""
186+
query = WOQLQuery()
187+
assert query._contains_update is False
188+
189+
# added_triple is a QUERY operation (finds triples added in commits)
190+
# It should NOT set _contains_update because it's not writing data
191+
query.added_triple("s", "p", "o")
192+
assert query._contains_update is False # Correct - this is a read operation
193+
194+
# Cursor should be at the added triple query
195+
assert query._cursor["@type"] == "AddedTriple"
185196

186197
def test_nested_cursor_operations(self):
187198
"""Test deeply nested cursor operations."""

0 commit comments

Comments
 (0)