Skip to content

Commit 07495a8

Browse files
authored
Prepare for PyNWB 3.1.2 (#2122)
* update CHANGELOG * clean up tempdir in tests
1 parent 9e06719 commit 07495a8

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PyNWB Changelog
22

3-
## Unreleased
3+
## PyNWB 3.1.2 (August 13, 2025)
44

55
### Fixed
66
- Fixed parsing of the nwb_version attribute which followed the previous suggestion to have a `NWB-` prefix.

tests/back_compat/test_read.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,20 @@ def test_read_electrodes_table_as_neurodata_type(self):
146146
assert read_nwbfile.acquisition["ElectricalSeries"].electrodes.table is read_nwbfile.electrodes
147147

148148
# test that export writes the correct builders
149-
temp_dir = tempfile.TemporaryDirectory()
150-
export_file = Path(temp_dir.name) / "3.0.0_electrodes_dynamic_table_export.nwb"
151-
with NWBHDF5IO(export_file, 'w') as export_io:
152-
export_io.export(io)
153-
154-
with self.get_io(export_file) as read_export_io:
155-
read_export_nwbfile = read_export_io.read()
156-
assert isinstance(read_export_nwbfile.electrodes, ElectrodesTable)
157-
158-
# test that references to the electrodes table are also ElectrodesTable
159-
units_table_ref = read_export_nwbfile.units.electrodes.table
160-
assert units_table_ref is read_export_nwbfile.electrodes
161-
eseries_table_ref = read_export_nwbfile.acquisition["ElectricalSeries"].electrodes.table
162-
assert eseries_table_ref is read_export_nwbfile.electrodes
149+
with tempfile.TemporaryDirectory() as temp_dir:
150+
export_file = Path(temp_dir) / "3.0.0_electrodes_dynamic_table_export.nwb"
151+
with NWBHDF5IO(export_file, 'w') as export_io:
152+
export_io.export(io)
153+
154+
with self.get_io(export_file) as read_export_io:
155+
read_export_nwbfile = read_export_io.read()
156+
assert isinstance(read_export_nwbfile.electrodes, ElectrodesTable)
157+
158+
# test that references to the electrodes table are also ElectrodesTable
159+
units_table_ref = read_export_nwbfile.units.electrodes.table
160+
assert units_table_ref is read_export_nwbfile.electrodes
161+
eseries_table_ref = read_export_nwbfile.acquisition["ElectricalSeries"].electrodes.table
162+
assert eseries_table_ref is read_export_nwbfile.electrodes
163163

164164
def test_read_bands_table_as_neurodata_type(self):
165165
"""Test that a "bands" table written as a DynamicTable is read as an FrequencyBandsTable"""

0 commit comments

Comments
 (0)