Impossible to allow directories with leading underscores

47 views
Skip to first unread message

Zero Piraeus

unread,
May 13, 2014, 12:05:46 PM5/13/14
to nose...@googlegroups.com
:

In the process of answering a Stack Overflow question <http://stackoverflow.com/questions/23615924/nosetests-discover-code-in-test-folder>, I've discovered that nose has a hardcoded restriction on directories that start with an underscore:

https://github.com/nose-devs/nose/blob/00ae0930e3bfad41279a0899e8c699f2ac1ff209/nose/loader.py#L164

          if is_dir:
                # this hard-coded initial-underscore test will be removed:
                # http://code.google.com/p/python-nose/issues/detail?id=82
                if entry.startswith('_'):
                    continue

As you can see, the comment suggests that there was an intention to remove this restriction, but since the linked issue was closed six years ago, presumably that intention has been forgotten or discarded (I note the difficulties mentioned in the discussion of the issue re: careless plugins).

The OP at SO was clearly confused by this behaviour, and another answer to the SO question (now deleted) suggested using --ignore to get around it (which doesn't work, because of the aforementioned hardcoded restriction) ... all of which suggests that, if the issue isn't going to be fixed, it might be better documented to avoid other users being bitten.

Does anyone know what the status is on this? Does the issue need to be reopened (or the promise to remove the restriction removed from the source)?

 -[]z.
Reply all
Reply to author
Forward
0 new messages