Skip to content

Commit

Permalink
Skip predict test for round-1352-640-div4
Browse files Browse the repository at this point in the history
We were accurate on this contest which predates fake ratings, but are
no longer after this adjustment.
  • Loading branch information
meooow25 committed Apr 2, 2024
1 parent 45757fe commit f21751d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions carrot/tests/test-predict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import predict, { PredictResult } from '../src/background/predict.js';
import { DataRow, readTestData, dataRowsToContestants } from './rounds.ts';
import { assertEquals } from './asserts.ts';

const KNOWN_INACCURATE_PREDICTIONS =
[ 'round-1352-640-div4' // Inaccurate after Github #53
]

function expectedDeltas(rows: DataRow[]): Map<string, number> {
return new Map(rows.map((row) => [row.handle, row.trueDelta]));
}
Expand All @@ -14,7 +18,9 @@ function predictedDeltas(rows: DataRow[]): Map<string, number> {
}

for (const data of readTestData()) {
Deno.test('predict_' + data.name, (): void => {
assertEquals(predictedDeltas(data.rows), expectedDeltas(data.rows));
})
if (!KNOWN_INACCURATE_PREDICTIONS.includes(data.name)) {
Deno.test('predict_' + data.name, (): void => {
assertEquals(predictedDeltas(data.rows), expectedDeltas(data.rows));
});
}
}

0 comments on commit f21751d

Please sign in to comment.