Elena Oat <[email protected]> added the comment:
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'.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39578>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com