[py-dev] Bug in collect.Error

holger krekel hpk at trillke.net
Tue Mar 15 21:29:07 CET 2005


Hi Jan, 

On Tue, Mar 15, 2005 at 20:02 +0100, Jan Balster wrote:
> holger krekel wrote:
> > i just committed this to the trunk although this will
> > likely become obsolete soon when the "py-collect" branch is 
> > merged back into the trunk (intended to unify and clean up
> > the test collection process) ... 
> 
> i just finished a small tkinter gui for py.test with a tree view for all
> collectors and items.

Cool! 

> the main part is a gui-reporter, which sends information through a
> extpy.channel to the gui. i think, i have to use a subclass of driver now.
> 
> the new FailureCollector in run.py is great. i had a problem to get the
> right name (like collector.listnames()) for a failed item returned by
> the old FailureCollector. thats much easier now, thank you.

hey, you are using the collect branch already?  Nice! and crazy :-) 

> what kind of object is root in FailureCollector:
>    "for root, names in failures"?

Well, this particular bit is not fully spelled out yet, 
to be honest. 

> i think, it should be a collect.Directory or collect.Module, but sending
> them through a extpy.channel doesn't work:
>
> eval(repr(directory_object)) != directory_object

yip, you are right.  Probably it will be "implicitely" encoded 
so that the FrontendDriver and the remote end will agree that
"root" is e.g. a filesystem path (as a string) which has to be 
wrapped by (indeed) a collect.Directory object. 
So the channel would only see lists and strings basically 
from which the "collect/item tree" can be constructed. 

> terminaldriver.run() (--> driver.run()) returns nothing (None), so i
> can't deduce the object type from the source.

Yes, that return value is one of the missing bits in the branch! 
I'll try to finish that up asap. 

cheers! 

    holger



More information about the Pytest-dev mailing list