I ran into a weird issue where tests are being removed from a TestSuite after calling TextTestRunner’s run method on it.
After a lot of wasted time, I found the problem on lines 65-66 of suite.py:
It looks like other people before me have encountered this issue as well (python - How to run the same TestSuite multiple times unittest texttestrunner - Stack Overflow).
I was surprised to see this hard-coded in such a way.
The _cleanup flag should really be optional (e.g. a keyword arg cleanup=True, which can be overridden by the user)