pytest-django
pytest-django copied to clipboard
A Django plugin for pytest.
I had a lot of trouble figuring out how to set up my tests given that various tests needed different things in the database, and some tests used live_server which...
Related to issue: https://github.com/pytest-dev/pytest-django/issues/1155
Depends on https://github.com/pytest-dev/pytest-django/pull/1202 Related to https://github.com/pytest-dev/pytest-django/pull/1201 -- had to close it due to CI not running This all started because yesterday codecov was having issues, and p!$#ed me off... This...
Fixes issue: https://github.com/pytest-dev/pytest-django/issues/1183 https://github.com/pytest-dev/pytest-django/issues/1131 See: https://github.com/pytest-dev/pytest-django/issues/1183#issuecomment-2781362063
There are weird tests in `TestLiveServer.test_settings_before`/`test_settings_restored` that requires `xdist` to not be used. Since they set a global variable, and due to how xdist works, you cannot guarantee the order...
For the most part, the "Install dependencies" step, sees a decrease of 2-3s for each job [Main](https://github.com/pytest-dev/pytest-django/actions/runs/15476151028) [This PR](https://github.com/pytest-dev/pytest-django/actions/runs/15478405158?pr=1216)
Depends on: https://github.com/pytest-dev/pytest-django/pull/1203 [This PR takes 3:01s](https://github.com/pytest-dev/pytest-django/actions/runs/15284894599) [Normally it takes 3:43s](https://github.com/pytest-dev/pytest-django/actions/runs/15262309320) Saves ~40s of run time
The only way to declare that a fixture requires a database is the `db` fixture. However, since #1186 this will only pull in the default database. As far as I...
Running a test that uses live_server after a test that uses transactional_db causes database errors
Hi all! I am using python 3.13, sqlite 3.46 and pytest-django 4.8 on Debian Trixie. My test suite uses an sqlite in-memory database. I am seeing an issue in my...