@@ -33,6 +33,8 @@ def test__validate_regular_expressions_valid():
3333 "ms2rescore" : {
3434 "psm_id_pattern" : r"scan:(\d+):.*" ,
3535 "spectrum_id_pattern" : r"spectrum_(\d+)" ,
36+ "psm_id_rt_pattern" : None ,
37+ "psm_id_im_pattern" : None ,
3638 }
3739 }
3840 result = _validate_regular_expressions (config )
@@ -45,6 +47,8 @@ def test__validate_regular_expressions_none():
4547 "ms2rescore" : {
4648 "psm_id_pattern" : None ,
4749 "spectrum_id_pattern" : None ,
50+ "psm_id_rt_pattern" : None ,
51+ "psm_id_im_pattern" : None ,
4852 }
4953 }
5054 result = _validate_regular_expressions (config )
@@ -57,6 +61,8 @@ def test__validate_regular_expressions_invalid_regex():
5761 "ms2rescore" : {
5862 "psm_id_pattern" : r"scan:(\d+" , # Missing closing parenthesis
5963 "spectrum_id_pattern" : None ,
64+ "psm_id_rt_pattern" : None ,
65+ "psm_id_im_pattern" : None ,
6066 }
6167 }
6268 with pytest .raises (MS2RescoreConfigurationError , match = "Invalid regular expression" ):
@@ -69,6 +75,8 @@ def test__validate_regular_expressions_no_capturing_group():
6975 "ms2rescore" : {
7076 "psm_id_pattern" : r"scan:\d+:.*" , # No capturing group
7177 "spectrum_id_pattern" : None ,
78+ "psm_id_rt_pattern" : None ,
79+ "psm_id_im_pattern" : None ,
7280 }
7381 }
7482 with pytest .raises (
@@ -83,6 +91,8 @@ def test__validate_regular_expressions_multiple_capturing_groups():
8391 "ms2rescore" : {
8492 "psm_id_pattern" : r"scan:(\d+):(.*)" , # Two capturing groups
8593 "spectrum_id_pattern" : None ,
94+ "psm_id_rt_pattern" : None ,
95+ "psm_id_im_pattern" : None ,
8696 }
8797 }
8898 with pytest .raises (
@@ -97,6 +107,8 @@ def test__validate_regular_expressions_spectrum_id_pattern_invalid():
97107 "ms2rescore" : {
98108 "psm_id_pattern" : None ,
99109 "spectrum_id_pattern" : r"spectrum_\d+" , # No capturing group
110+ "psm_id_rt_pattern" : None ,
111+ "psm_id_im_pattern" : None ,
100112 }
101113 }
102114 with pytest .raises (
0 commit comments