It is needed for `run_cmd_qa` because after a number of hits on the same pattern we assume we have hit a question, and thus try to answer it. If we can't find a question patterns that matches, we fail after a certain time, assuming we don't know how to answer the question.

So, this particular sleep is relevant, and when removed is troublesome for even a fairly simple testcase, e.g.:

```python
(out, ec) = ft.run_cmd_qa("echo question; read x; echo $x", {"question": "answer"})
self.assertEqual(out, "question\nanswer\n")
```

without the sleep in the loop you run into a problem like:

```
FAIL: runTest (__main__.FileToolsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "easybuild/test/filetools.py", line 93, in runTest
    self.assertEqual(out, "question\nanswer\n")
AssertionError: 'question\n' != 'question\nanswer\n'
```

So, the output that's obtained is incomplete. I'm not sure why this is though; this is not related to catching questions and being able to ignore non-questions, and it's probably also relevant for `run_cmd` to make sure the full output is obtained...