From f21751d1f0790a25d66afdb7cbde6e7a05d78c36 Mon Sep 17 00:00:00 2001 From: meooow25 Date: Wed, 3 Apr 2024 03:15:06 +0530 Subject: [PATCH] Skip predict test for round-1352-640-div4 We were accurate on this contest which predates fake ratings, but are no longer after this adjustment. --- carrot/tests/test-predict.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/carrot/tests/test-predict.ts b/carrot/tests/test-predict.ts index a453a9b..32f606a 100644 --- a/carrot/tests/test-predict.ts +++ b/carrot/tests/test-predict.ts @@ -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 { return new Map(rows.map((row) => [row.handle, row.trueDelta])); } @@ -14,7 +18,9 @@ function predictedDeltas(rows: DataRow[]): Map { } 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)); + }); + } }