You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose we add a management command, maybe something like python manage.py setup_pytest which will create a sane pytest.ini with some default settings. I intend the generated file to look something like this.
The file itself will be generated using the iniconfig package which pytest already depends on. Looks like iniconfig is not capable of writing files, in which case, I will just generate the file using inbuilt strings.
Finally, relevant documentation will also need to be written.
I would make a PR to do all this, when (and if) this is accepted.
The text was updated successfully, but these errors were encountered:
pytest-django itself is not a Django app, so I'm not sure if we can hook up a custom management command, though it may be possible (I haven't looked too closely).
But in general I think something like this is perhaps better as a cookiecutter template?
I generally do not recommend cookiecutter since it introduces a dependency for the project. However, we can quickly transform pytest-django to a django app by creating pytest_django/management/commands/setup_pytest.py and then ask users to add pytest_django to their installed apps. Here is a detailed discussion about this topic.
I propose we add a management command, maybe something like
python manage.py setup_pytest
which will create a sanepytest.ini
with some default settings. I intend the generated file to look something like this.The file itself will be generated using the iniconfig package which pytest already depends on.Looks like iniconfig is not capable of writing files, in which case, I will just generate the file using inbuilt strings.Finally, relevant documentation will also need to be written.
I would make a PR to do all this, when (and if) this is accepted.
The text was updated successfully, but these errors were encountered: