Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markwoon committed Feb 28, 2025
1 parent 5ff5649 commit ec65d4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void sortException() throws Exception {
System.out.println("\t" + result.getVcfWarnings().get(key));
}

assertEquals(78, result.getVcfWarnings().size());
assertEquals(34, result.getVcfWarnings().size());
GeneCall rez = result.getGeneCalls().stream().filter(g -> g.getGene().equals("CYP2D6"))
.findAny()
.orElseThrow(() -> new IllegalStateException("CYP2D6 not called"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void multipleDiplotypes(TestInfo testInfo) throws Exception {
System.out.println("normal");
System.out.println(normalTsv);
String[] lines = normalTsv.split("\n");
assertEquals(3, lines.length);
assertEquals(4, lines.length);
Map<String, List<String>> geneMap = parseTsv(lines, 16, "CYP2C19", "DPYD");
assertEquals(1, geneMap.get("CYP2C19").size());
assertEquals(1, geneMap.get("DPYD").size());
Expand Down Expand Up @@ -170,7 +170,7 @@ void withDebugInfo(TestInfo testInfo) throws Exception {
System.out.println("normal");
System.out.println(normalTsv);
String[] lines = normalTsv.split("\n");
assertEquals(10, lines.length);
assertEquals(11, lines.length);
Map<String, List<String>> geneMap = parseTsv(lines, 18, genes);
assertEquals(1, geneMap.get("CYP2C19").size());
assertEquals(1, geneMap.get("DPYD").size());
Expand Down Expand Up @@ -248,6 +248,9 @@ private SortedMap<String, List<String>> parseTsv(String[] lines, int maxColumns,
// test normal
SortedMap<String, List<String>> geneMap = new TreeMap<>();
for (String line : lines) {
if (line.startsWith("PharmCAT") || line.startsWith("Gene\t") || line.startsWith("Sample ID\t")) {
continue;
}
String[] data = line.split("\t");
if (data.length != maxColumns) {
StringBuilder builder = new StringBuilder();
Expand Down

0 comments on commit ec65d4b

Please sign in to comment.