MCPcopy Create free account
hub / github.com/dask/dask / test_delayed_errors

Function test_delayed_errors

dask/tests/test_delayed.py:315–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313
314
315def test_delayed_errors():
316 a = delayed([1, 2, 3])
317 # Immutable
318 pytest.raises(TypeError, lambda: setattr(a, "foo", 1))
319 pytest.raises(TypeError, lambda: setitem(a, 1, 0))
320 # Can't iterate, or check if contains
321 pytest.raises(TypeError, lambda: 1 in a)
322 pytest.raises(TypeError, lambda: list(a))
323 # No dynamic generation of magic/hidden methods
324 pytest.raises(AttributeError, lambda: a._hidden())
325 # Truth of delayed forbidden
326 pytest.raises(TypeError, lambda: bool(a))
327
328
329def test_common_subexpressions():

Callers

nothing calls this directly

Calls 2

delayedFunction · 0.90
setitemFunction · 0.85

Tested by

no test coverage detected