8000 Failing Pregel Doctest by apetenchea · Pull Request #332 · arangodb/python-arango · GitHub
[go: up one dir, main page]

Skip to content

Failing Pregel Doctest #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2024
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
8000
Diff view
2 changes: 1 addition & 1 deletion docs/pregel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ iterative graph processing. For more information, refer to `ArangoDB manual`_.

**Example:**

.. testcode::
.. code-block:: python

from arango import ArangoClient

Expand Down
13 changes: 7 additions & 6 deletions docs/transaction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ logical unit of work (ACID compliant).
assert '_rev' in txn_col.insert({'_key': 'Lily'})
assert len(txn_col) == 6

# Abort the transaction
txn_db.abort_transaction()
assert 'Kate' not in col
assert 'Mike' not in col
assert 'Lily' not in col
assert len(col) == 3 # transaction is aborted so txn_col cannot be used

# Fetch an existing transaction. Useful if you have received a Transaction ID
# from some other part of your system or an external system.
original_txn = db.begin_transaction(write='students')
Expand All @@ -76,13 +83,7 @@ logical unit of work (ACID compliant).
txn_db = db.fetch_transaction(original_txn.transaction_id)
txn_col = txn_db.collection('students')
assert '_rev' in txn_col.insert({'_key': 'Alya'})

# Abort the transaction
txn_db.abort_transaction()
assert 'Kate' not in col
assert 'Mike' not in col
assert 'Lily' not in col
assert len(col) == 3 # transaction is aborted so txn_col cannot be used

See :ref:`TransactionDatabase` for API specification.

Expand Down
0