[issue35767] unittest loader doesn't work with partial test functions

Jason Fried report at bugs.python.org
Thu Jan 17 20:25:21 EST 2019


New submission from Jason Fried <me at jasonfried.info>:

https://github.com/python/cpython/blob/3.7/Lib/unittest/loader.py#L232

fullName = '%s.%s' % (testCaseClass.__module__, testFunc.__qualname__)

Instead we should probably replace testFunc.__qualname__ with attrname

I ran into this while running a test suite that built up test functions using partials and added them to the TestCase class with setattr. 

This works in 3.6.3

----------
messages: 333926
nosy: fried, lisroach, lukasz.langa
priority: normal
severity: normal
status: open
title: unittest loader doesn't work with partial test functions
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35767>
_______________________________________


More information about the Python-bugs-list mailing list