Re: Force destroying dialogs

Robin Dunn <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
On Monday, January 6, 2020 at 10:36:28 AM UTC-8, Tim Roberts wrote:
>
> It's a hack, but have you tried wx.Yield? 
>

I use code like this in unittests where MainLoop can't be run: 
https://github.com/wxWidgets/Phoenix/blob/master/unittests/wtc.py#L41 It 
creates a new, temporary event loop and then uses it to yield and allow  
events to be processed. There is some other code in that module that may be 
helpful as well.

Even better, of course, is to organize your code such that all the code 
used by the dialogs can be tested without actually creating the dialog, and 
then add one more test that simply tests that the dialog can be 
instantiated and destroyed.

--
Robin 

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/0c62372b-8f78-4591-85f2-4c161fc4c923%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.