diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /tests/transactions/tests.py | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'tests/transactions/tests.py')
| -rw-r--r-- | tests/transactions/tests.py | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/transactions/tests.py b/tests/transactions/tests.py index 9fe8c58593..a3cd4cafee 100644 --- a/tests/transactions/tests.py +++ b/tests/transactions/tests.py @@ -244,7 +244,9 @@ class AtomicTests(TransactionTestCase): class AtomicInsideTransactionTests(AtomicTests): - """All basic tests for atomic should also pass within an existing transaction.""" + """ + All basic tests for atomic should also pass within an existing transaction. + """ def setUp(self): self.atomic = transaction.atomic() @@ -255,7 +257,9 @@ class AtomicInsideTransactionTests(AtomicTests): class AtomicWithoutAutocommitTests(AtomicTests): - """All basic tests for atomic should also pass when autocommit is turned off.""" + """ + All basic tests for atomic should also pass when autocommit is turned off. + """ def setUp(self): transaction.set_autocommit(False) @@ -393,7 +397,9 @@ class AtomicMySQLTests(TransactionTestCase): @skipIf(threading is None, "Test requires threading") def test_implicit_savepoint_rollback(self): - """MySQL implicitly rolls back savepoints when it deadlocks (#22291).""" + """ + MySQL implicitly rolls back savepoints when it deadlocks (#22291). + """ Reporter.objects.create(id=1) Reporter.objects.create(id=2) @@ -457,7 +463,8 @@ class AtomicMiscTests(TransactionTestCase): sid = connection.savepoint_ids[-1] raise Exception("Oops") - # This is expected to fail because the savepoint no longer exists. + # This is expected to fail because the savepoint no longer + # exists. connection.savepoint_rollback(sid) def test_mark_for_rollback_on_error_in_transaction(self): @@ -497,8 +504,8 @@ class AtomicMiscTests(TransactionTestCase): raise Exception("Oops") - # Ensure that `mark_for_rollback_on_error` did not mark the transaction - # as broken, since we are in autocommit mode … + # Ensure that `mark_for_rollback_on_error` did not mark the + # transaction as broken, since we are in autocommit mode … self.assertFalse(transaction.get_connection().needs_rollback) # … and further queries work nicely. @@ -526,7 +533,9 @@ class NonAutocommitTests(TransactionTestCase): Reporter.objects.last() def test_orm_query_without_autocommit(self): - """#24921 -- ORM queries must be possible after set_autocommit(False).""" + """ + #24921 -- ORM queries must be possible after set_autocommit(False). + """ Reporter.objects.create(first_name="Tintin") |
