Skip to content

Commit

Permalink
ReportBuilder insert methods take models rather than a list of fields
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-codecov committed Apr 29, 2024
1 parent 09a2168 commit 8fc847a
Show file tree
Hide file tree
Showing 5 changed files with 360 additions and 538 deletions.
50 changes: 21 additions & 29 deletions src/parsers/pyreport_shim/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,39 +744,31 @@ mod tests {
fn stub_report_builder(report_builder: &mut MockReportBuilder<MockReport>) {
report_builder
.expect_insert_coverage_sample()
.returning(|_, _, _, _, _, _| {
.returning(|_| {
Ok(CoverageSample {
..Default::default()
})
});
report_builder
.expect_insert_branches_data()
.returning(|_, _, _, _, _| {
Ok(BranchesData {
..Default::default()
})
});
report_builder
.expect_insert_method_data()
.returning(|_, _, _, _, _, _, _| {
Ok(MethodData {
..Default::default()
})
});
report_builder
.expect_insert_span_data()
.returning(|_, _, _, _, _, _, _| {
Ok(SpanData {
..Default::default()
})
});
report_builder
.expect_associate_context()
.returning(|_, _, _, _, _| {
Ok(ContextAssoc {
..Default::default()
})
});
report_builder.expect_insert_branches_data().returning(|_| {
Ok(BranchesData {
..Default::default()
})
});
report_builder.expect_insert_method_data().returning(|_| {
Ok(MethodData {
..Default::default()
})
});
report_builder.expect_insert_span_data().returning(|_| {
Ok(SpanData {
..Default::default()
})
});
report_builder.expect_associate_context().returning(|_| {
Ok(ContextAssoc {
..Default::default()
})
});
report_builder.expect_insert_context().returning(|_, name| {
Ok(Context {
name: name.to_string(),
Expand Down
Loading

0 comments on commit 8fc847a

Please sign in to comment.