django pytest vs unittest code example
Example 1: python run pytest
Just type this in shell:
pytest
Or this if that does nott work:
python -m pytest
Example 2: pytest tests in subfolder
# Create a file containing
import os, pathlib
import pytest
os.chdir( pathlib.Path.cwd() / 'Tests' )
pytest.main()
# And use the command `python tests.py` to run it.