Skip to content


Subversion checkout URL

You can clone with
Download ZIP


support load_tests protocol #13

jpellerin opened this Issue · 8 comments

4 participants


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:


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)
@jpellerin jpellerin closed this

just for information - was this ported into nose?


Not as far as I know.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.