ENH: Change the API to support passing of number of test failures.