[TIP] Any good way to test Tkinter apps?
brett at python.org
Tue Dec 25 11:33:26 PST 2007
On Dec 25, 2007 9:11 AM, Titus Brown <titus at caltech.edu> wrote:
> On Mon, Dec 24, 2007 at 10:42:31PM -0800, Brett Cannon wrote:
> -> I am trying to be a good developer with my first solo open source app
> -> and write tests for everything. In this case it means testing a
> -> Tkinter GUI.
> -> But the great Google oracle isn't being helpful in finding anything to
> -> help with this. Is there a good way to do this beyond manual testing?
> -> And if there isn't, is there a cross-platform GUI toolkit (that works
> -> on OS X) that does have good testing help?
> Hi Brett,
> I'm not aware of anything for Tkinter.
Thanks for the info Titus (and Laura for her previous emails).
I finally got tired of Tkinter and what seemed like inconsistent
behavior that last night I rewrote the GUI in wxPython last night
(Happy Xmas everyone!) and it already works better than the Tkinter
version. =) Now if wxPython would just get better docs I would be
really happy (not big on learning almost exclusively from examples).
> Qt at least has testing hooks, but I'm not sure how easy it is to use
> Python to test Qt apps.
OK, good to know.
> KWWidgets is a young framework that has been strongly recommended to me;
> it's by the cmake/ctest/vtk/itk/DART folk. It's a C++ wrapping of Tk,
> with Python wrapping on top of that. (Yes, it sounds hacky, but
> apparently it's actually quite nice ;) It was explicitly designed to be
> easier to test than existing alternatives.
Huh. Interesting. Might just have a look at that since I am always
looking for a GUI toolkit that is easy enough to use that I might
actually consider using it over terminal I/O.
> And, finally, Gnome/GTK has some testing packages that use the
> accessibility UI. See here:
I heard of that usage before.
Advogato? Any reason you don't link directly off of your personal
site (wondering for when I link to your posts from my blog)?
Yep, it did!
And obviously thanks for your continual help on GHOP. You are a machine, Titus.
More information about the testing-in-python