Skip to content

Commit

Permalink
fix: disregard tsv output order in brca2_zar1l test (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil authored Sep 2, 2024
1 parent 9eb545a commit d5e1066
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/annotate/seqvars/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2260,9 +2260,28 @@ mod test {
run(&args_common, &args).await?;

let actual = std::fs::read_to_string(args.output.path_output_tsv.unwrap())?;
let header_actual = actual
.lines()
.filter(|l| l.starts_with('#'))
.collect::<Vec<_>>();
let records_actual = actual
.lines()
.filter(|l| !l.starts_with('#'))
.collect::<std::collections::HashSet<_>>();

let expected =
std::fs::read_to_string("tests/data/annotate/seqvars/brca2_zar1l/brca2_zar1l.tsv")?;
assert_eq!(&expected, &actual);
let header_expected = expected
.lines()
.filter(|l| l.starts_with('#'))
.collect::<Vec<_>>();
let records_expected = expected
.lines()
.filter(|l| !l.starts_with('#'))
.collect::<std::collections::HashSet<_>>();

assert_eq!(&header_actual, &header_expected);
assert_eq!(&records_actual, &records_expected);

Ok(())
}
Expand Down

0 comments on commit d5e1066

Please sign in to comment.