Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 8d5866b

Browse files
1 parent 94d8f2a commit 8d5866b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/unit/test_session.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,11 +1702,11 @@ def unit_of_work(txn, *args, **kw):
17021702
def _time(_results=[1, 2, 4, 8]):
17031703
return _results.pop(0)
17041704

1705-
with mock.patch("time.time", _time), \
1706-
mock.patch("google.cloud.spanner_v1._helpers.random.random", return_value=0), \
1707-
mock.patch("time.sleep") as sleep_mock:
1708-
with self.assertRaises(Aborted):
1709-
session.run_in_transaction(unit_of_work, timeout_secs=8)
1705+
with mock.patch("time.time", _time), mock.patch(
1706+
"google.cloud.spanner_v1._helpers.random.random", return_value=0
1707+
), mock.patch("time.sleep") as sleep_mock:
1708+
with self.assertRaises(Aborted):
1709+
session.run_in_transaction(unit_of_work, timeout_secs=8)
17101710

17111711
# unpacking call args into list
17121712
call_args = [call_[0][0] for call_ in sleep_mock.call_args_list]

0 commit comments

Comments
 (0)