diff --git a/tests/test_integration.py b/tests/test_integration.py index 47cee936..28fdf90a 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -75,7 +75,10 @@ def test_train_and_run( assert psms.loc[3, "sequence"] == "LESLLEK" assert psms.loc[3, "spectra_ref"] == "ms_run[2]:scan=17" assert psms.loc[4, "sequence"] == "PEPTLDEK" - assert psms.loc[4, "spectra_ref"] == "ms_run[2]:scan=111" + assert ( + psms.loc[4, "spectra_ref"] + == "ms_run[2]:merged=11 frame=12 scanStart=763 scanEnd=787" + ) # Finally, try evaluating: output_filename = tmp_path / "test-eval.mztab" diff --git a/tests/unit_tests/test_unit.py b/tests/unit_tests/test_unit.py index 120e341a..877f6a95 100644 --- a/tests/unit_tests/test_unit.py +++ b/tests/unit_tests/test_unit.py @@ -864,7 +864,7 @@ def test_spectrum_id_mgf(mgf_small, tmp_path): def test_spectrum_id_mzml(mzml_small, tmp_path): - """Test that spectra from mzML files are specified by their scan number.""" + """Test that spectra from mzML files are specified by their scan id.""" mzml_small2 = tmp_path / "mzml_small2.mzml" shutil.copy(mzml_small, mzml_small2) @@ -872,15 +872,15 @@ def test_spectrum_id_mzml(mzml_small, tmp_path): tmp_path / "index.hdf5", [mzml_small, mzml_small2], overwrite=True ) dataset = SpectrumDataset(index) - for i, (filename, scan_nr) in enumerate( + for i, (filename, scan_id) in enumerate( [ - (mzml_small, 17), - (mzml_small, 111), - (mzml_small2, 17), - (mzml_small2, 111), + (mzml_small, "scan=17"), + (mzml_small, "merged=11 frame=12 scanStart=763 scanEnd=787"), + (mzml_small2, "scan=17"), + (mzml_small2, "merged=11 frame=12 scanStart=763 scanEnd=787"), ] ): - spectrum_id = str(filename), f"scan={scan_nr}" + spectrum_id = str(filename), scan_id assert dataset.get_spectrum_id(i) == spectrum_id