New submission from Kevin Jamieson :
This worked in Python 3.6, but in Python 3.7 and later creating a mock with a
spec specifying a subscripted generic class does not mock any of the attributes
of the class, because those attributes are not returned by dir().
For example:
# cat test.py
New submission from Kevin Jamieson :
In Python 3.8 and later creating a mock with a spec specifying an object
containing a property that happens to raise an exception when accessed will
fail, because _mock_add_spec calls getattr() on every attribute of the spec.
This did not happen in Python