dimanche 24 novembre 2019

Get pass or fail output from Django unit tests

For my Django project I am trying to get 0 or 1 output from python manage.py test for whether or not all the tests have passed.

I'm wanting to run the tests in a bash script and then have the script know whether or not all the tests have passed, and if so continue to do some other actions.

This is the closest I've been able to get, but the output is not right

output=$(python manage.py test)
output=$(python manage.py test 0 2>&1)

Aucun commentaire:

Enregistrer un commentaire