diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b08ecbfe..a493bc934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # PyNWB Changelog +## PyNWB 4.1.1 (Unreleased) + +### Fixed +- Fixed `mock_DeviceModel` defaulting `manufacturer` to `None`, which made every call raise `TypeError: DeviceModel.__init__: None is not allowed for 'manufacturer'` because `DeviceModel` requires `manufacturer` to be a `str`. The mock now defaults it to `"manufacturer"`, matching the other mock defaults, and is covered by the parametrized `test_mock`/`test_mock_write` tests. @HugoFara [#2232](https://github.com/NeurodataWithoutBorders/pynwb/pull/2232) + + ## PyNWB 4.1.0 (July 23, 2026) ### Changed diff --git a/src/pynwb/testing/mock/device.py b/src/pynwb/testing/mock/device.py index 4499cc01d..9124e8e1a 100644 --- a/src/pynwb/testing/mock/device.py +++ b/src/pynwb/testing/mock/device.py @@ -26,7 +26,7 @@ def mock_Device( def mock_DeviceModel( name: Optional[str] = None, - manufacturer: str = None, + manufacturer: str = "manufacturer", model_number: Optional[str] = None, description: str = "description", nwbfile: Optional[NWBFile] = None, diff --git a/tests/unit/test_mock.py b/tests/unit/test_mock.py index f0b805337..2fc202634 100644 --- a/tests/unit/test_mock.py +++ b/tests/unit/test_mock.py @@ -23,7 +23,7 @@ mock_OptogeneticSeries ) -from pynwb.testing.mock.device import mock_Device +from pynwb.testing.mock.device import mock_Device, mock_DeviceModel from pynwb.testing.mock.behavior import ( mock_Position, @@ -68,6 +68,7 @@ mock_OptogeneticStimulusSite, mock_OptogeneticSeries, mock_Device, + mock_DeviceModel, mock_Position, mock_PupilTracking, mock_CompassDirection,