sympy/sympy — pull request #1758 by certik (2013-02-06 00:50:39+00:00)
Title: Travis-CI: propagate tests failures back to Travis

The problem was that somehow the nonzero exit code was not always propagated to
Travis. I have found that using just one executable statement fixes it. So now
we run both tests and doctests using one Python session.

See here for an example of results:

https://travis-ci.org/certik/sympy/builds/4605973

so it works like a charm.