rcxwhiz / django-hierarchical-models

MIT License
1 stars 0 forks source link

Get django model testing working #7

Closed rcxwhiz closed 6 months ago

rcxwhiz commented 6 months ago

I think that the django-model-utils repo is going to be my best example of a project that writes and tests stuff with django models.

rcxwhiz commented 6 months ago

It looks like I should be using pytest-django. Still have yet to figure out if I should be using pytest/tox (or both?).

rcxwhiz commented 6 months ago

Got tox running locally as well as in GH actions. Still need to resolve pre-commit. I don't know if I want to force tox to run for every pre-commit, or if I want to just run the tests from tox on the current environment. It seems like my pre-commit tox setup was a little bugged. I would also like to get pip stuff cached in my actions test script.

rcxwhiz commented 6 months ago

There is also the question of putting black into the mix.

rcxwhiz commented 6 months ago

I think I just added some sort of dependency caching to the actions script, so I'm considering that done for now.

rcxwhiz commented 6 months ago

I got the pre-commit hooks working. I decided against adding tox or even pytest to it because according to some best practices that would slow down the commit process too much and people should be running their tests before they commit. Now the only remaining item is to decide the fate of incorporating black into the project.

rcxwhiz commented 6 months ago

I've decided to put a pin in adding black formatting to the project right now. Maybe it will seem appropriate later.