Skip to content

Commit

Permalink
Fix test failures on parallel testing for ConsoleExportSpecLibTest an…
Browse files Browse the repository at this point in the history
…d ConsoleExportMProphetTest (#2775)

Use TestFilesDir.GetTestPath to specify new document path
  • Loading branch information
henrytsanford authored Nov 14, 2023
1 parent 00967d0 commit 6096a59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pwiz_tools/Skyline/TestData/CommandLineTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,9 @@ public void ConsoleExportSpecLibTest()
// A document with results that should be able to export a spectral library
var docWithResults = TestFilesDir.GetTestPath("msstatstest.sky");
var exportPath = TestFilesDir.GetTestPath("out_lib.blib"); // filepath to export library to
var newDocumentPath = TestFilesDir.GetTestPath("new.sky");
// Test error (no peptide precursors)
var output = RunCommand("--new=" + "new.sky", // Create a new document
var output = RunCommand("--new=" + newDocumentPath, // Create a new document
"--overwrite", // Overwrite, as the file may already exist in the bin
"--exp-speclib-file=" + exportPath // Export a spectral library
);
Expand Down Expand Up @@ -681,11 +682,12 @@ public void ConsoleExportMProphetTest()
var expectedExportTargetsBestPeaks = TestFilesDir.GetTestPathLocale("MProphet_expected_targets_only_best_peaks_only.csv");
// The expected export when excluding the "Intensity" and "Standard signal to noise" features.
var expectedExportExcludeFeatures = TestFilesDir.GetTestPathLocale("MProphet_expected_exclude_features.csv");
var newDocumentPath = TestFilesDir.GetTestPath("new.sky");
// A string that is not a feature name or a mProphet file header
const string invalidFeatureName = "-la";

// Test error (no targets)
var output = RunCommand("--new=" + "new.sky", // Create a new document
var output = RunCommand("--new=" + newDocumentPath, // Create a new document
"--overwrite", // Overwrite, as the file may already exist in the bin
"--exp-mprophet-file=" + exportPath // Export mProphet features
);
Expand Down

0 comments on commit 6096a59

Please sign in to comment.