Проще:
```python
while self.pending_tests_list:
    # while block
```