nose-devs/nose — pull request #587 by jszakmeister (2012-12-09 12:42:17+00:00)
Title: Fix an infinite recursion issue when traversing namespaces in Python 3.3...

....

It turns out that module.__path__ in Python 3.3 is returning a list that
includes the parent directory of the test. So, instead of something
like:
['.../support/namespace_pkg/namespace_pkg',
'.../support/namespace_pkg/site-packages/namespace_pkg']

it's:
['.../support/namespace_pkg/namespace_pkg',
'.../support/namespace_pkg',
'.../support/namespace_pkg/site-packages/namespace_pkg']

That middle entry forces us to go back and re-examine everything all
over again.

We have two choices to combat the problem: verify that there's an
__init__.py in the directory (verify that it's really a package),
or keep a set of already traversed paths. This commit takes the first
approach.