File: test_2856_export_remove_structure_and_prettyprint.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 (30 lines) | stat: -rw-r--r-- 1,462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward/blob/main/LICENSE

from __future__ import annotations


def test_prettyprint_rename():
    import awkward._prettyprint as deprecated_prettyprint
    import awkward.prettyprint as new_prettyprint

    assert new_prettyprint.Formatter is deprecated_prettyprint.Formatter
    assert new_prettyprint.FormatterOptions is deprecated_prettyprint.FormatterOptions
    assert new_prettyprint.FormatterType is deprecated_prettyprint.FormatterType
    assert new_prettyprint.PlaceholderValue is deprecated_prettyprint.PlaceholderValue
    assert new_prettyprint.alternate is deprecated_prettyprint.alternate
    assert new_prettyprint.custom_str is deprecated_prettyprint.custom_str
    assert new_prettyprint.get_at is deprecated_prettyprint.get_at
    assert new_prettyprint.get_field is deprecated_prettyprint.get_field
    assert new_prettyprint.half is deprecated_prettyprint.half
    assert new_prettyprint.is_identifier is deprecated_prettyprint.is_identifier
    assert new_prettyprint.valuestr is deprecated_prettyprint.valuestr
    assert new_prettyprint.valuestr_horiz is deprecated_prettyprint.valuestr_horiz


def test_remove_structure_rename():
    from awkward._do import remove_structure as deprecated_remove_structure
    from awkward.contents.remove_structure import (
        remove_structure as new_remove_structure,
    )

    assert new_remove_structure is deprecated_remove_structure