Skip to content

Commit 236ec6a

Browse files
committed
test_serialize: Silence pynwb warning
pynwb 3.1.2 does currently always output a warning about a missing .nwb ending in path even if path was not passed at all and is None. This will be fixed in [1], ignore the warning until we require that version. We also drop the path argument to NWBHDF5IO as that is not needed. [1]: NeurodataWithoutBorders/pynwb#2130
1 parent 97e0634 commit 236ec6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/attach_metadata/test_nwb2_sink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def test_get_subject(nwbfile, set_none):
8080

8181

8282
@pytest.mark.filterwarnings("ignore:.*Value with data type int64 is being converted to data type uint64.*")
83+
@pytest.mark.filterwarnings("ignore:.*It is recommended that NWB files using the HDF5 backend use the '.nwb' extension.")
8384
def test_serialize(tmpdir_factory, nwbfile):
8485
out_path = os.path.join(
8586
str(tmpdir_factory.mktemp("test_serialize")),
@@ -90,7 +91,6 @@ def test_serialize(tmpdir_factory, nwbfile):
9091
sink._data = io.BytesIO()
9192
sink._h5_file = h5py.File(sink._data, "w")
9293
sink._nwb_io = pynwb.NWBHDF5IO(
93-
path=sink._h5_file.filename,
9494
mode="w",
9595
file=sink._h5_file
9696
)

0 commit comments

Comments
 (0)