Author Claudiu.Popa
Recipients Claudiu.Popa, eric.smith, ezio.melotti, michael.foord
Date 2013-03-23.22:16:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364076995.93.0.673504015567.issue17457@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, it iterates over every member of the namespace path. The new attached patch fixes this behaviour, by checking that each loader path starts with top_level_dir when set_implicit_top is False (if set_implicit_top is True, top_level_dir is irrelevant, start_dir will be the package name).

 Also, with the original patch there were other issues:
  1. if no tests were found for the namespace package, the same failure as before would have occurred at the lines:

  +        if not tests:
  +            tests = list(self._find_tests(start_dir, pattern))

  2. it iterated every subfolder, by dropping the check for __init__.py. To fix this, I added a new keyword argument to _find_tests, `namespace` which defaults to False. If it is True, then we are checking a namespace package and subfolders will be checked even if they don't have a __init__.py file.
History
Date User Action Args
2013-03-23 22:16:35Claudiu.Popasetrecipients: + Claudiu.Popa, eric.smith, ezio.melotti, michael.foord
2013-03-23 22:16:35Claudiu.Popasetmessageid: <1364076995.93.0.673504015567.issue17457@psf.upfronthosting.co.za>
2013-03-23 22:16:35Claudiu.Popalinkissue17457 messages
2013-03-23 22:16:35Claudiu.Popacreate