Closed niluxv closed 6 months ago
Hi there, thanks for the report! I don't seem to be able to reproduce this issue with datatest-stable, with:
panic!
Err(something)
Could you provide a minimal reproducible example?
Hm, it seems to require using Trial::with_kind
.
Example:
use libtest_mimic::{Arguments, Failed, Trial};
fn main() -> anyhow::Result<()> {
let args = Arguments::from_args();
let tests = vec![
Trial::test("example.txt", erroring_test).with_kind("parse")
];
libtest_mimic::run(&args, tests).exit();
}
fn erroring_test() -> Result<(), Failed> {
// either return error or panic!, cargo nextest will still show as `PASS`
//panic!();
Err("Error, this doesn't work".into())
}
Ah thanks for the extended report. This is a bug in libtest-mimic.
I've proposed https://github.com/LukasKalbertodt/libtest-mimic/pull/30 in libtest-mimic which will fix this. For now, please avoid using with_kind
.
Thank you for looking into this!
This should be fixed with a libtest-mimic update. Thanks for the report!
I'm using a custom test harness using
libtest-mimic
(version 0.6.0), but when one of those tests fails,cargo nextest run
still reports it as passed.