From 807e02b00df3d930ff4a6fd114397b3f2c022eb4 Mon Sep 17 00:00:00 2001 From: nbollis Date: Tue, 20 Aug 2024 14:13:53 -0500 Subject: [PATCH] fixed the test? --- MetaMorpheus/Test/SpectralRecoveryTest.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MetaMorpheus/Test/SpectralRecoveryTest.cs b/MetaMorpheus/Test/SpectralRecoveryTest.cs index 40c519ec4..3257361c6 100644 --- a/MetaMorpheus/Test/SpectralRecoveryTest.cs +++ b/MetaMorpheus/Test/SpectralRecoveryTest.cs @@ -285,6 +285,8 @@ public static void MiniClassicSearchEngineTest() [Test] public static void SpectralWriterTest() { + foreach (var specLibPath in Directory.GetFiles(outputFolder, "*.msp", SearchOption.AllDirectories)) + File.Delete(specLibPath); PostSearchAnalysisTask postSearchTask = new PostSearchAnalysisTask() { @@ -377,7 +379,7 @@ public static void SpectralWriterTest() postSearchTask.Run(); var libraryList = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories); - string updateLibraryPath = libraryList.First(p => p.Contains("SpectralLibrary") && !p.Contains(matchingvalue)).ToString(); + string updateLibraryPath = libraryList.First(p => p.Contains("updateSpectralLibrary") && !p.Contains(matchingvalue)).ToString(); var updatedLibraryWithoutDecoy = new SpectralLibrary(new List { Path.Combine(path, updateLibraryPath) }); Assert.That(updatedLibraryWithoutDecoy.TryGetSpectrum("EESGKPGAHVTVK", 2, out spectrum));