Message361763
Here's the example I ran, that indeed fails in Python 3.8 and Python 3.9 (with different errors) and works in Python 3.7.
from unittest.mock import MagicMock
class CustomMock(MagicMock):
def __init__(self):
super().__init__(__something__='something')
mock = CustomMock()
MagicMock(mock)
In Python 3.8 the error is TypeError: __init__() got an unexpected keyword argument '_new_parent'.
In Python 3.9 the error is TypeError: __init__() got an unexpected keyword argument 'name'. |
|
Date |
User |
Action |
Args |
2020-02-11 00:03:09 | Elena.Oat | set | recipients:
+ Elena.Oat, cjw296, michael.foord, lisroach, mariocj89, xtreak, Frank Harrison |
2020-02-11 00:03:09 | Elena.Oat | set | messageid: <1581379389.49.0.391019449242.issue39578@roundup.psfhosted.org> |
2020-02-11 00:03:09 | Elena.Oat | link | issue39578 messages |
2020-02-11 00:03:09 | Elena.Oat | create | |
|