@@ -1464,16 +1464,7 @@ def test_channels_tsv_raw_mismatch(tmp_path):
14641464 raw .reorder_channels (ch_names_new )
14651465 raw .save (raw_path , overwrite = True )
14661466
1467- with (
1468- pytest .warns (
1469- RuntimeWarning ,
1470- match = (
1471- r"Channel mismatch between .*channels\.tsv and the raw data file "
1472- r"detected\. Using mismatch strategy: reorder\."
1473- ),
1474- ),
1475- ):
1476- raw = read_raw_bids (bids_path , on_ch_mismatch = "reorder" )
1467+ raw = read_raw_bids (bids_path , on_ch_mismatch = "reorder" )
14771468 assert raw .ch_names == ch_names_orig
14781469
14791470
@@ -1566,9 +1557,7 @@ def test_channel_mismatch_raise(tmp_path):
15661557 raw , _ , _ , channels_fname , _ , _ = _setup_nirs_channel_mismatch (tmp_path )
15671558 with pytest .raises (
15681559 RuntimeError ,
1569- match = (
1570- r"Channel mismatch between .*channels\.tsv and the raw data file detected\."
1571- ),
1560+ match = ("Channel mismatch between .*channels" ),
15721561 ):
15731562 _handle_channels_reading (channels_fname , raw .copy (), on_ch_mismatch = "raise" )
15741563
@@ -1578,18 +1567,7 @@ def test_channel_mismatch_reorder(tmp_path):
15781567 raw , _ , ch_order_bids , channels_fname , orig_name_to_loc , orig_name_to_data = (
15791568 _setup_nirs_channel_mismatch (tmp_path )
15801569 )
1581- with (
1582- pytest .warns (
1583- RuntimeWarning ,
1584- match = (
1585- r"Channel mismatch between .*channels\.tsv and the raw data file "
1586- r"detected\. Using mismatch strategy: reorder\."
1587- ),
1588- ),
1589- ):
1590- raw_out = _handle_channels_reading (
1591- channels_fname , raw , on_ch_mismatch = "reorder"
1592- )
1570+ raw_out = _handle_channels_reading (channels_fname , raw , on_ch_mismatch = "reorder" )
15931571 assert raw_out .ch_names == ch_order_bids
15941572 for i , new_name in enumerate (raw_out .ch_names ):
15951573 np .testing .assert_allclose (
@@ -1610,18 +1588,9 @@ def test_channel_mismatch_rename(tmp_path):
16101588 orig_name_to_loc ,
16111589 orig_name_to_data ,
16121590 ) = _setup_nirs_channel_mismatch (tmp_path )
1613- with (
1614- pytest .warns (
1615- RuntimeWarning ,
1616- match = (
1617- r"Channel mismatch between .*channels\.tsv and the raw data file "
1618- r"detected\. Using mismatch strategy: rename\."
1619- ),
1620- ),
1621- ):
1622- raw_out_rename = _handle_channels_reading (
1623- channels_fname , raw .copy (), on_ch_mismatch = "rename"
1624- )
1591+ raw_out_rename = _handle_channels_reading (
1592+ channels_fname , raw .copy (), on_ch_mismatch = "rename"
1593+ )
16251594 assert raw_out_rename .ch_names == ch_order_bids
16261595 for i in range (len (ch_order_bids )):
16271596 orig_name_at_i = ch_order_snirf [i ]
0 commit comments