Implement timing out in the Python test runner