From dcad301c8b3000dc3e6fca66fcf43e6462b6cb8e Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Thu, 16 Jan 2025 08:55:43 -0600 Subject: [PATCH] fix test after Steph commit --- tests/integration/io/test_read.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/integration/io/test_read.py b/tests/integration/io/test_read.py index 5067182bd..145e689d0 100644 --- a/tests/integration/io/test_read.py +++ b/tests/integration/io/test_read.py @@ -68,7 +68,10 @@ def test_read_invalid_file(self): path = Path(temp_dir) / "test.txt" path.write_text("Not an NWB file") - with self.assertRaisesWith(ValueError, - f"Unable to read file: '{path}'. The file exists but is not recognized as " - "either a valid HDF5 or Zarr NWB file. Please ensure the file contains valid NWB data."): - read_nwb(path=path) + expected_message = ( + f"Unable to read file: '{path}'. The file is not recognized as either a valid HDF5 or Zarr NWB file. " + "Please ensure the file exists and contains valid NWB data." + ) + + with self.assertRaisesWith(ValueError, expected_message): + read_nwb(path=path) \ No newline at end of file