Hi Meme, On Sun, Mar 20, 2011 at 22:00 +1100, meme dough wrote: > Hi, > > Currently looking at fixing pytest-cov to work with latest pytest. I > see two issues so far. > > 1. How to determine if non distributed, or distributed master, or > distributed slave. > > This used to look at the session class Session = Central (non > distributed), DSession = distributed master, and SlaveSession = > distributed slave. > > So now I'm thinking look at > session.config.pluginmanager.hasplugin('dsession') which means > distributed master. For distributed slave check if config.slaveinput > is there which means distributed slave. If none of those then must be > non distributed.
I guess that's ok. There is no "official" way at the moment. > Is there a better way to determine at pytest_sessionstart if the > process is central (non distributed), distributed master or > distributed slave? > > 2. Need to know topdir. > > This used to use config.topdir to know what the root dir is. This is > needed since distributed testing may be co-located or not. If not > then have to rewrite all source paths back to what the master is set > to so that all coverage files combine correctly even if have many > separate tx envs on diff machines on diff paths. > > Has this moved somewhere? I see config.fspath, is that it? I look > more I just got to this bit. No, there now is a "looponfailroots" (see --help) and distributed testing uses "rsyncroots". The problem is that "topdir" was a bit of an artifical concept. Maybe it helps, that item.nodeid contains a "::" separated test id where the first part is a path relative to the current directory and normalized to use "/" as separator. best, holger _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev