_________________________________________________________________________ test_sfunc __________________________________________________________________________
def test_sfunc():
with pytest.raises(ValueError):
> drv.sfunc({})
tests/test_rv.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DRV(drv), sample = {}
def sfunc(self, sample):
""" Return the result of ``func`` on the sampled data, where *sample*
must contain all coordinates of self's probability space, but may also
contain coordinates of other probability spaces, which should be
ignored. In case not all coordinates are included in *sample*, raise
``ValueError``.
*sample* is a dictionary pointing probability spaces to contained
outcomes. """
ws = []
> for pspace in self.pspace.pspaces:
try:
ws.append(sample[pspace])
E AttributeError: 'DPSpace' object has no attribute 'pspaces'
drv/rv.py:40: AttributeError