MCPcopy Index your code
hub / github.com/pydata/xarray / test_repr

Function test_repr

xarray/tests/test_namedarray.py:605–614  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

603
604
605def test_repr() -> None:
606 x: NamedArray[Any, np.dtype[np.uint64]]
607 x = NamedArray(("x",), np.array([0], dtype=np.uint64))
608
609 # Reprs should not crash:
610 r = x.__repr__()
611 x._repr_html_()
612
613 # Basic comparison:
614 assert r == "<xarray.NamedArray (x: 1)> Size: 8B\narray([0], dtype=uint64)"
615
616
617@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

__repr__Method · 0.95
_repr_html_Method · 0.95
NamedArrayClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…