Fixing pytest_handle_exception error on travis-ci.