Unit testing for python works under very speciffic circumstances from the terminal