With unittest
I can check if there were failed tests during test run like this:
import unittest
all_tests = unittest.defaultTestLoader.discover('path-to-tests')
results = unittest.TextTestRunner().run(all_tests)
if results.wasSuccessful():
do_something()
else:
do_something_else()
How to do the same with nose2
?
Finally found an answer.