[py-dev] Re: reponsiveness of tkinter frontend

holger krekel hpk at trillke.net
Sun Apr 10 12:57:24 CEST 2005


Hi Jan,

(CCed to py-dev because other might be interested yadda yadda) 

On Sun, Apr 10, 2005 at 12:28 +0200, Jan Balster wrote:
> holger krekel wrote:
> > Hi Jan, 
> > 
> > i was wondering if you know why tkinter does not 
> > remain responsive throughout the testing process. 
> > I have been using it a couple of times but felt
> > that the UI often blocked.
> 
> The tree is updated for every call to guidriver.start and guidriver.end.
> If you can see many tree items, it's very slow. That's a problem with
> the tktree package I use.

It's not possible for to just update part of the tree? 

> I can write quickly a simple frontend with a list for failed and skipped
> tests if you need a more responsive gui.

I am not sure exactly here.  But I think a simple list of failed tests 
with a fully responsive GUI (so i can inspect failures while testing 
continues seamlessly) would be a good idea.  Btw, ExceptionFailures 
are subclasses of Failed and should be considered plain failures. 
The distinction only exists for reporting purposes (exception failures
show differently than "normal" assertion failures or runtime Exceptions).  
So if i may wish for something: i would offer checkboxes for 

    failed [x] 
    skipped [ ]
    passed [ ]

with only "failed" tests being shown by default.  A status line 
(as well as the title of the windows, probably) shows the full
test path being run at the moment. Note that i changed the default
output for "py.test" to now show full module names.  This became 
possible because the import system / logic got sanitized a lot 
and basically every test now always has a full package path, no 
matter if you run it directly or from some higher up directory.  
This uniformity is important for customization purposes. 

Also soon coming (i hope :-) is the feature i mention here: 

http://codespeak.net/py/current/doc/test.html#selecting-tests-by-queries-full-text-search

The according tkinter interface could be a google style textfield where 
you can change the set of "selected tests" by dynamically specifying 
queries.  The list of tests could even be updated after every key stroke
("incremental search").  I am just mentioning this because it might
play a role in your tkinter internal design decisions. 

> > Another issue was, that when i clicked on a failure
> > to investigate a problem that the ongoing testing
> > process kept resetting the bottom window's focus
> > to the first line. 
> 
> The tree widget remembers which item was selected before the tests are
> executed and trys to reselect the item when it's recreated (test is
> executed). So that shouldn't happen. I can't reproduce your result, can
> you describe exactly what you did?

Next time i have the problem, i try to describe it in more detail. 

thanks & cheers, 

    holger



More information about the Pytest-dev mailing list