Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelHu authored Dec 7, 2024
1 parent 530206b commit e40e468
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_lgdo_utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
from __future__ import annotations

import h5py
import numpy as np

from lgdo import utils


def test_get_element_type():
# variable length HD5 string datatype.
h5py_str_dtype = h5py.string_dtype(encoding="ascii", length=None)

objs = [
("hi", "string"),
(True, "bool"),
Expand All @@ -16,6 +20,7 @@ def test_get_element_type():
(1 + 1j, "complex"),
(b"hi", "string"),
(np.array(["hi"]), "string"),
(np.array([b"hi"], h5py_str_dtype), "string"),
]

for obj, name in objs:
Expand Down

0 comments on commit e40e468

Please sign in to comment.