Re:Ask HN: I'm less productive with TDD. Am I doing it wrong?
by geophile on Wednesday October 04, 2017 @01:38PM
(#15402320)
That only works if the code you are testing does everything in auto-commit mode. Which is often a terrible idea. If your code uses transactions, then no, the framework cannot rely on rollback to do setup and teardown.
Re:Ask HN: I'm less productive with TDD. Am I doing it wrong?
by brianwawok on Sunday October 08, 2017 @08:47AM
(#15428001)
I use django with transactions and tests work fine. I think a transaction within a transaction is treated as a checkpoint.
In postgres at least, Wouldn't your framework create a db transaction that then is rolled back at the end of the test?