When I am running django test cases using python manage.py test
I wnat to send an email if test cases completed successfully
As it returns 0 if success and 1 if failure, where I can get this 0 and 1 in my python script ?
I have tried using shell script then it works perfectly
#!/bin/bash
TEST_RESULT=`python manage.py test`
rc=$?;
if [[ $rc -eq 0 ]]
then
echo "Tests Passed Successfully"
else
echo "Tests failed"
fi
Now I want this in python script. help me in this. Thanks
Aucun commentaire:
Enregistrer un commentaire