Re: [pytest-dev] How can I suppress cleanups when a test fails

2021-04-16 Thread Bruno Oliveira
y > assertion failures during this session?” > > > > Topher Eliot > > > > *From:* Ronny Pfannschmidt > *Sent:* Thursday, April 15, 2021 3:05 PM > *To:* Eliot, Christopher ; > pytest-dev@python.org > *Subject:* Re: [pytest-dev] How can I suppress cleanups when a t

Re: [pytest-dev] How can I suppress cleanups when a test fails

2021-04-15 Thread Eliot, Christopher
r ; pytest-dev@python.org Subject: Re: [pytest-dev] How can I suppress cleanups when a test fails in case you use a orm/abstraction layer, sqlite in a tmpdir can be a wonderful companion in case you use another db, you can actually have failures do a db/data dump if you like, unfortunately i'm

Re: [pytest-dev] How can I suppress cleanups when a test fails

2021-04-15 Thread Ronny Pfannschmidt
in case you use a orm/abstraction layer, sqlite in a tmpdir can be a wonderful companion in case you use another db, you can actually have failures do a db/data dump if you like, unfortunately i'm not aware of a tmp_path alike db setup/teardown tool --Ronny Am 15.04.21 um 23:00 schrieb

Re: [pytest-dev] How can I suppress cleanups when a test fails

2021-04-15 Thread Ronny Pfannschmidt
Hi Christopher, if you use the tmpdir/tmp_path fixtures pytest provides, just don't do additional cleanup, pytest keeps the last 3 basetemps around precisely for that use-case and drops older ones -- Ronny Am 15.04.21 um 21:56 schrieb Eliot, Christopher: My test suit generates some

Re: [pytest-dev] How can I suppress cleanups when a test fails

2021-04-15 Thread Eliot, Christopher
Thank you. This might be helpful, but I also have other resources that are not files that I would like to selectively clean up or not. These resources are in a relational DB, not a file system. And no, I can't just wrap everything in a big transaction and then roll it back, unfortunately.