Skip to content
Open
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
Diff view
6 changes: 6 additions & 0 deletions docs/transactions-savepoints-and-atomic.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ which can be used as both a decorator and a context manager.
Working inside a transaction may not isolate you from changes made outside the transaction.
For more info see [Transaction Isolation] in PostgreSQL's docs.

### Testing

By default, [Django's `TestCase`][TestCase] runs all tests in a transaction. Django Subatomic hooks into Django's test infrastructure to make this test transaction completely transparent. This allows realistic testing of code using [`transaction`][django_subatomic.db.transaction] without needing [Django's `TransactionTestCase`][TransactionTestCase].
Comment on lines +39 to +41
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is important to note, but I'm not sure that this is the place to document it... but I'm not sure if we have an appropriate doc yet 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it, I think we need a whole doc just on testing. I hope to start on that soon.


## Savepoints

A savepoint is a mark inside a transaction
Expand Down Expand Up @@ -108,3 +112,5 @@ which makes it hard to know what to expect from it.

[transaction isolation]: https://www.postgresql.org/docs/current/transaction-iso.html
[django-atomic]: https://docs.djangoproject.com/en/stable/topics/db/transactions/#django.db.transaction.atomic
[TestCase]: https://docs.djangoproject.com/en/stable/topics/testing/tools/#django.test.TestCase
[TransactionTestCase]: https://docs.djangoproject.com/en/stable/topics/testing/tools/#django.test.TransactionTestCase