-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pytest gets stuck when testing app with dynamically mounting animated widgets on timer #4866
Comments
We found the following entries in the FAQ which you may find helpful:
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review. This is an automated reply, generated by FAQtory |
Are you doing a lot of animation? The test system will wait for animation to complete after keys / clicks etc. This is so the snapshot can be taken at a point where the state is knowable. But it does mean that if you are always animating, it will never return! |
Currently around every second, but its dependend on an attack_speed variable, so in the application itself it might be faster. Edit: Thanks @willmcgugan |
ill close this then |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
When testing my app with pytest, the test doesnt continue at a certain point.
Testfile: https://github.com/Zaloog/idle-tui-adventures/blob/main/tests/test_app.py
My initial guess was an issue with 2 intervalls running at the same in my app.
But after some debugging, its just the one timer, that makes the test stop.
My assumption is, that it has to do with the mounting of the damage widgets, which are Labels initialized with this method called:
Here is a short clip to show what that looks like:
https://github.com/user-attachments/assets/08c72ad2-36c2-4018-97f2-c794d2aadbbf
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
PyTest Setup:
The text was updated successfully, but these errors were encountered: