-
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
Testing: ContentSwitcher behaving differently under testing #5132
Comments
I think you might just need to add an |
Hmm.. That worked. Pretty weird. I didn't think about this because all the places where I used this function, I did not use the |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
It will still work without the await, but it won't have completed on the very next line. Adding new content will do a little work in the background. |
That makes a lot more sense. Thanks Will ! |
Question @willmcgugan , how should I test this then ideally? Thank you! |
If you call |
That works. Thank you |
Have you checked closed issues? https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed
Yes
Please give a brief but clear explanation of the issue. If you can, include a complete working example that demonstrates the bug. Check it can run without modifications.
Thanks for the built in testing mechanism! I've noticed some weird behaviour while testing with ContentSwitcher
Take this example for instance:
When run, this throws an error:
which means, it doesn't even get mounted
Note: If I pass an initial parameter, that gets recognized
It will be helpful if you run the following command and paste the results:
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
If you don't have the
textual
command on your path, you may have forgotten to install thetextual-dev
package.Feel free to add screenshots and / or videos. These can be very helpful!
The text was updated successfully, but these errors were encountered: