pub(super) fn compare(graph: &PackageGraph, common: GuppyCargoCommon) -> TestCaseResult {
    let verbose = matches!(
        env::var("PROPTEST_VERBOSE")
            .as_ref()
            .map(|val| val.as_str()),
        Ok("true") | Ok("1")
    );
    let diff_opts = DiffOpts { common, verbose };
    let ctx = GlobalContext::new(true, graph).expect("context created");
    let target_host_diff = diff_opts
        .compute_diff(&ctx)
        .expect("compute_diff succeeded");
    if target_host_diff.any_diff() {
        println!("{}", target_host_diff);
        Err(TestCaseError::fail("diff found"))
    } else {
        Ok(())
    }
}
Test that there is no diff between guppy and cargo for the same query.
internal-tools/cargo-compare/src/tests/proptest_helpers.rs