unittest.TestCase is not multiple-inheritance cooperative
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
unittest's TestCase does not call super().__init__() which breaks cooperative multiple inheritance.
I would be happy to add this, but I can imagine someone somewhere relies on cooperative multiple inheritance not working.
CPython versions tested on:
3.11, 3.12, 3.13, CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-125287
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with unittest.TestCase initialization and reproduce the cooperative multiple-inheritance case on CPython. Check the behavior across the reported Python versions and identify the relevant unittest tests. Done means TestCase cooperates with multiple inheritance without breaking existing initialization behavior, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100