Skip to content

Commit

Permalink
added builder to the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson committed Dec 13, 2024
1 parent 8f2d1d2 commit 64c00ba
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
import pytest
from pynwb import get_manager
from pynwb.testing.mock.file import mock_NWBFile

from neuroconv.tools.nwb_helpers import DatasetIOConfiguration
Expand Down Expand Up @@ -89,8 +90,12 @@ def get_data_io_kwargs(self):
data = np.array(["test", "string", "abc"], dtype=object)
nwbfile.add_trial_column(name="test", description="test column with object dtype but all strings", data=data)
neurodata_object = nwbfile.trials.columns[2]
manager = get_manager()
builder = manager.build(nwbfile)

dataset_io_configuration = TestDatasetIOConfiguration.from_neurodata_object(neurodata_object, dataset_name="data")
dataset_io_configuration = TestDatasetIOConfiguration.from_neurodata_object(
neurodata_object, dataset_name="data", builder=builder
)

assert dataset_io_configuration.chunk_shape == (3,)
assert dataset_io_configuration.buffer_shape == (3,)
Expand Down

0 comments on commit 64c00ba

Please sign in to comment.