This should be a separate loader plugin.
Removed from 0.2 milestone, as it's not clear to me yet how to implement it as a standalone plugin. See description of load_tests protocol here: http://docs.python.org/library/unittest.html#load-tests-protocol.
A couple comments:
Why wouldn't you want nose to support the load_tests protocol by default? It seems like nose should discover at least those tests discovered by unittest.
Also, I experienced a related problem whereby nose interpreted my load_tests() function as a test itself (because it matched the default regular expression), and a failing test at that. This required a hack to get around. At the least, perhaps nose could not interpret anything called "load_tests" as a test.
Forgive me if my comments are outdated or don't add to what you already know, as I'm not an expert nose user. Thanks.
Basically everything in nose2 is implemented as a plugin -- so being a plugin doesn't mean load_tests wouldn't be on by default. I expect it would be, since it's unittest2 core feature.
We'll definitely also have to exclude load_tests from normal test collection. Good news is, this is next on my todo list. Bad news, I still don't know how to do it and it might slip again.
That sounds great. And thanks for the quick response!
Re: load_tests, I poked around in the code a bit. I'm now curious as to how load_tests is even being picked up (perhaps it's not in nose2). I only see a testMethodPrefix attribute being used, which doesn't apply of course. And there doesn't seem to be a corresponding suffix string or use of endswith (or even a testMatch regular expression as described in these docs).
Separate from my observations, what is the difficulty you see in skipping load_tests?
Yes, it looks like perhaps the second part of my comment is only applicable to nose and not nose2. nose2 doesn't seem to have code like the following (from here):
self.testMatchPat = env.get('NOSE_TESTMATCH',
r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)
just for information - was this ported into nose?
Not as far as I know.