I am new to pytest, I am running a very simple test to assert a model creation, but running the test seems to take a substantial amount of time. I have maybe 10 models tops, none of which are incredibly complicated.
4.67 setup
0.69s call
0.09s teardown
This is with adding the arguments (without the arguments it's over 30 seconds!):
pytest --nomigrations --reuse-db
Am I doing something wrong? How do I decrease this setup time? Does setup time depend on number of models, something else? I can't imagine how long this will take once the app gets big. Any advise is welcome.
py.test some/package/tests/test_feature.py
, orpython -m unittest some.package.tests.test_feature
for the more generic option (which I personally prefer), however if you were to eschew portability/genericity of the base unittest framework, pytest specific extensions may be used: #34833827 – Clementineclementis