File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,34 @@ def test_read_file_blocks_prune(self):
185185 with self .subTest (port_id = port_id ):
186186 self .assertTrue (port ["samples" ])
187187
188+ def test_read_file_blocks_no_prune (self ):
189+ """Check that we keep empty channels when pruning is False"""
190+ path = Path (self .get_local_path ("alphaomega/mpx_map_version4" ))
191+ reader = AlphaOmegaRawIO (dirname = path )
192+ mpx_file = Path (
193+ self .get_local_path ("alphaomega/mpx_map_version4/mapfile0054.mpx" )
194+ )
195+ (
196+ metadata ,
197+ continuous_analog_channels ,
198+ segmented_analog_channels ,
199+ digital_channels ,
200+ channel_type ,
201+ stream_data_channels ,
202+ ports ,
203+ events ,
204+ _ , # ignore unknown_blocks
205+ ) = reader ._read_file_blocks (mpx_file , prune_channels = False )
206+
207+ self .assertFalse (
208+ all (c ["positions" ] for c in continuous_analog_channels .values ())
209+ )
210+ self .assertFalse (
211+ all (c ["positions" ] for c in segmented_analog_channels .values ())
212+ )
213+ self .assertFalse (all (c ["samples" ] for c in digital_channels .values ()))
214+ self .assertFalse (all (c ["samples" ] for c in ports .values ()))
215+
188216 def test_correct_number_of_blocks_and_segments (self ):
189217 """We just check that when we read test data we get what we expect"""
190218 reader = AlphaOmegaRawIO (
You can’t perform that action at this time.
0 commit comments