From 7c71a0fd9656b61ecece335c39b0144a4641466a Mon Sep 17 00:00:00 2001 From: caetano melone Date: Tue, 30 Apr 2024 21:37:49 -0700 Subject: [PATCH] predict -> predict_single --- gantry/tests/test_prediction.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gantry/tests/test_prediction.py b/gantry/tests/test_prediction.py index 8f93055..29bc261 100644 --- a/gantry/tests/test_prediction.py +++ b/gantry/tests/test_prediction.py @@ -19,7 +19,7 @@ async def test_exact_match(db_conn_inserted): """All fields are an exact match for 5 samples in the database.""" assert ( - await prediction.predict_single(db_conn_inserted, defs.NORMAL_BUILD) + await prediction.predict(db_conn_inserted, defs.NORMAL_BUILD) == defs.NORMAL_PREDICTION ) @@ -32,7 +32,7 @@ async def test_expensive_variants(db_conn_inserted): """ assert ( - await prediction.predict_single(db_conn_inserted, defs.EXPENSIVE_VARIANT_BUILD) + await prediction.predict(db_conn_inserted, defs.EXPENSIVE_VARIANT_BUILD) == defs.NORMAL_PREDICTION ) @@ -43,7 +43,7 @@ async def test_no_variant_match(db_conn_inserted): """ assert ( - await prediction.predict_single(db_conn_inserted, defs.BAD_VARIANT_BUILD) + await prediction.predict(db_conn_inserted, defs.BAD_VARIANT_BUILD) == defs.DEFAULT_PREDICTION ) @@ -60,7 +60,7 @@ async def test_partial_match(db_conn_inserted): diff_compiler_build["compiler_name"] = "gcc-different" assert ( - await prediction.predict_single(db_conn_inserted, diff_compiler_build) + await prediction.predict(db_conn_inserted, diff_compiler_build) == defs.NORMAL_PREDICTION ) @@ -69,8 +69,7 @@ async def test_empty_sample(db_conn): """No samples in the database, so we expect default predictions.""" assert ( - await prediction.predict_single(db_conn, defs.NORMAL_BUILD) - == defs.DEFAULT_PREDICTION + await prediction.predict(db_conn, defs.NORMAL_BUILD) == defs.DEFAULT_PREDICTION )