Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct table col name #151

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pandablocks_ioc/_hdf_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def __init__(
datasets_record_name, ["Name", "Type"]
)
self._datasets_table_record.set_rows(
["Name", "Type"], [[], []], length=300, default_data_type=str
["Name", "DType"], [[], []], length=300, default_data_type=str
)

def hdf_writer_names(self) -> dict[str, dict[str, str]]:
Expand Down Expand Up @@ -363,7 +363,7 @@ def update_datasets_record(self):
]
self._datasets_table_record.update_row("Name", dataset_name_list)
self._datasets_table_record.update_row(
"Type",
"DType",
["float64"] * len(dataset_name_list),
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_hdf_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ def test_dataset_name_cache():

# Check that set_rows was called once with the correct arguments
mock_table_instance.set_rows.assert_called_once_with(
["Name", "Type"], [[], []], length=300, default_data_type=str
["Name", "DType"], [[], []], length=300, default_data_type=str
)
cache.update_datasets_record()

Expand All @@ -1340,7 +1340,7 @@ def test_dataset_name_cache():
"Name", ["test3", "test4", "test5"]
)
mock_table_instance.update_row.assert_any_call(
"Type", ["float64", "float64", "float64"]
"DType", ["float64", "float64", "float64"]
)

assert cache.hdf_writer_names() == {
Expand Down