10000 Failing Pregel Doctest (#332) · arangodb/python-arango@ead2e66 · GitHub
[go: up one dir, main page]

Skip to content

Commit ead2e66

Browse files
authored
Failing Pregel Doctest (#332)
* Failing doctest * Changing the order of examples
1 parent 21f25fe commit ead2e66

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/pregel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ iterative graph processing. For more information, refer to `ArangoDB manual`_.
1212

1313
**Example:**
1414

15-
.. testcode::
15+
.. code-block:: python
1616
1717
from arango import ArangoClient
1818

docs/transaction.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ logical unit of work (ACID compliant).
6868
assert '_rev' in txn_col.insert({'_key': 'Lily'})
6969
assert len(txn_col) == 6
7070

71+
# Abort the transaction
72+
txn_db.abort_transaction()
73+
assert 'Kate' not in col
74+
assert 'Mike' not in col
75+
assert 'Lily' not in col
76+
assert len(col) == 3 # transaction is aborted so txn_col cannot be used
77+
7178
# Fetch an existing transaction. Useful if you have received a Transaction ID
7279
# from some other part of your system or an external system.
7380
original_txn = db.begin_transaction(write='students')
@@ -76,13 +83,7 @@ logical unit of work (ACID compliant).
7683
txn_db = db.fetch_transaction(original_txn.transaction_id)
7784
txn_col = txn_db.collection('students')
7885
assert '_rev' in txn_col.insert({'_key': 'Alya'})
79-
80-
# Abort the transaction
8186
txn_db.abort_transaction()
82-
assert 'Kate' not in col
83-
assert 'Mike' not in col
84-
assert 'Lily' not in col
85-
assert len(col) == 3 # transaction is aborted so txn_col cannot be used
8687

8788
See :ref:`TransactionDatabase` for API specification.
8889

0 commit comments

Comments
 (0)
0