MCPcopy
hub / github.com/dask/dask / test_errors

Function test_errors

dask/array/tests/test_svg.py:36–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def test_errors():
37 # empty arrays
38 with pytest.raises(NotImplementedError) as excpt:
39 da.ones([]).to_svg()
40 assert "0 dimensions" in str(excpt.value)
41
42 # Scalars
43 with pytest.raises(NotImplementedError) as excpt:
44 da.asarray(1).to_svg()
45 assert "0 dimensions" in str(excpt.value)
46
47 # 0-length dims arrays
48 with pytest.raises(NotImplementedError) as excpt:
49 da.ones(10)[:0].to_svg()
50 assert "0-length dimensions" in str(excpt.value)
51
52 # unknown chunk sizes
53 with pytest.raises(NotImplementedError) as excpt:
54 x = da.ones(10)
55 x = x[x > 5]
56 x.to_svg()
57 assert "unknown chunk sizes" in str(excpt.value)
58
59
60def test_repr_html_size_units():

Callers

nothing calls this directly

Calls 2

to_svgMethod · 0.80
onesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…