Skip to content

Commit

Permalink
Pauldorsch/remove pip report throw (#1151)
Browse files Browse the repository at this point in the history
* remove throw for pip report so all pip files will be scanned

* fix tests
  • Loading branch information
pauld-msft authored Jun 4, 2024
1 parent 393db47 commit b3e3c9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ protected override async Task OnFileFoundAsync(ProcessRequest processRequest, ID
ExceptionMessage = e.Message,
StackTrace = e.StackTrace,
};

throw;
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ public async Task TestPipReportDetector_CatchesExceptionAsync()
this.pipCommandService.Setup(x => x.GenerateInstallationReportAsync(It.IsAny<string>(), It.IsAny<string>()))
.ThrowsAsync(new InvalidCastException());

var action = async () => await this.DetectorTestUtility
var (result, componentRecorder) = await this.DetectorTestUtility
.WithFile("setup.py", string.Empty)
.ExecuteDetectorAsync();
await action.Should().ThrowAsync<InvalidCastException>();

result.ResultCode.Should().Be(ProcessingResultCode.Success);

this.mockLogger.Verify(x => x.Log(
LogLevel.Warning,
Expand Down

0 comments on commit b3e3c9d

Please sign in to comment.