Describe the bug
The tests in test_animate.py are flaky in CI environments (especially on macOS/Windows runners).
The function check_animate_output uses time.sleep() to wait for the background animation thread to produce output. If the machine is under load or just slow, the sleep finishes before the thread has written the frames, causing the test to fail with "Not enough captured characters" or assertion errors.
How to reproduce
Expected behavior
The tests should be deterministic. Instead of sleeping for a fixed arbitrary time, the test should use a polling loop (continuously reading capsys) to wait until the expected output appears or a timeout is reached. This would make the tests faster and 100% reliable