Skip to content

Commit

Permalink
add html test array data type
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed May 2, 2024
1 parent e0ad0a1 commit 9cbcf64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def test_repr_html_(self):
)

def test_repr_html_array(self):
obj = self.ContainerWithData(data=np.array([1, 2, 3, 4]), str="hello")
obj = self.ContainerWithData(data=np.array([1, 2, 3, 4], dtype=np.int64), str="hello")
expected_html_table = (
'class="container-fields">NumPy Array<br><table class="data-info"><tbody><tr><th style="text-align: '
'left">shape</th><td style="text-align: left">(4,)</td></tr><tr><th style="text-align: left">dtype</'
Expand All @@ -489,7 +489,7 @@ def test_repr_html_hdf5_dataset(self):

# Open an HDF5 file in write mode
with h5py.File('data.h5', 'w') as file:
dataset = file.create_dataset(name='my_dataset', data=[1, 2, 3, 4])
dataset = file.create_dataset(name='my_dataset', data=np.array([1, 2, 3, 4], dtype=np.int64))
obj = self.ContainerWithData(data=dataset, str="hello")
expected_html_table = (
'class="container-fields">HDF5 Dataset<br><table class="data-info"><tbody><tr><th style="text-align: '
Expand Down

0 comments on commit 9cbcf64

Please sign in to comment.