From daedbb95fcbae990c4c6e04b1f1f322e1e9b081f Mon Sep 17 00:00:00 2001 From: Luigi Pertoldi Date: Sat, 16 Sep 2023 17:45:20 +0200 Subject: [PATCH] Add test for buffer size < number of channels --- tests/test_build_raw.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_build_raw.py b/tests/test_build_raw.py index 51d5eb6..52467e1 100644 --- a/tests/test_build_raw.py +++ b/tests/test_build_raw.py @@ -61,6 +61,15 @@ def test_build_raw_fc_ghissue10(lgnd_test_data, tmptestdir): assert os.path.exists(out_file) +def test_invalid_user_buffer_size(lgnd_test_data, tmptestdir): + with pytest.raises(ValueError): + build_raw( + in_stream=lgnd_test_data.get_path("fcio/L200-comm-20211130-phy-spms.fcio"), + buffer_size=5, + overwrite=True, + ) + + def test_build_raw_fc_out_spec(lgnd_test_data, tmptestdir): out_file = f"{tmptestdir}/L200-comm-20211130-phy-spms.lh5" out_spec = {