Michael Foord added the comment:
I think you're right! Thanks.
--
assignee: - michael.foord
resolution: fixed -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17052
Roundup Robot added the comment:
New changeset ece0a2e6b08e by Michael Foord in branch '2.7':
Correction to issue 17052 fix
http://hg.python.org/cpython/rev/ece0a2e6b08e
New changeset 867763eb6985 by Michael Foord in branch '3.2':
Correction to issue 17052 fix
Chris Jerdonek added the comment:
Thanks a lot for taking care of this issue, Michael.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17052
___
Roundup Robot added the comment:
New changeset b53b029895df by Michael Foord in branch 'default':
Merge. Closes issue 17052.
http://hg.python.org/cpython/rev/b53b029895df
--
nosy: +python-dev
resolution: - fixed
stage: test needed - committed/rejected
status: open - closed
Chris Jerdonek added the comment:
Michael, was this implemented correctly? Loader should be a callable (e.g. a
class), but self.testLoader is an instance (it defaults to
loader.defaultTestLoader, which equals loader.TestLoader()):
Chris Jerdonek added the comment:
+- Issue #17502: unittest discovery should use self.testLoader.
Also, this should read Issue #17052.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17052
Michael Foord added the comment:
I think you're correct - although I wonder if *anyone*, *ever* will be helped
by the change. :-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17052
___
Chris Jerdonek added the comment:
I will at least! :) I noticed the issue after trying to use unittest test
discovery with a custom loader. Fortunately, there is at least this
work-around (though it relies on an implementation detail):
class MyTestProgram(unittest.TestProgram):
New submission from Chris Jerdonek:
The _do_discovery() method of unittest.TestProgram:
def _do_discovery(self, argv, Loader=loader.TestLoader):
(from http://hg.python.org/cpython/file/2cf89e2e6247/Lib/unittest/main.py#l222 )
should be using self.testLoader instead of loader.TestLoader.