File: test_3564_length0_highlevel_repr.py

package info (click to toggle)
python-awkward 2.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,932 kB
  • sloc: python: 178,875; cpp: 33,828; sh: 432; makefile: 21; javascript: 8
file content (12 lines) | stat: -rw-r--r-- 345 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from __future__ import annotations

import awkward as ak


def test():
    length0 = ak.Array([])
    assert repr(length0) == "<Array [] type='0 * unknown'>"
    assert length0._repr_mimebundle_() == {
        "text/html": "<pre>\nbackend: cpu\nnbytes: 0 B\ntype: 0 * unknown</pre>",
        "text/plain": "<Array [] type='0 * unknown'>",
    }