From 4b6a46a9b70c6349cfa889825e3695a98cd49af6 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Fri, 3 Jan 2025 03:33:45 +0100
Subject: [PATCH] [tests] Fix use of classification evaluator

---
 tests/classify/test_evaluator.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/classify/test_evaluator.py b/tests/classify/test_evaluator.py
index 59253f80..3ec5bbb7 100644
--- a/tests/classify/test_evaluator.py
+++ b/tests/classify/test_evaluator.py
@@ -40,10 +40,13 @@ def test_run_binary_1() -> None:
         ("s3", [1], [0.4]),
     ]
 
+    rng = numpy.random.default_rng(42)
+
     results = run(
         "test",
         predictions,
         binning=10,
+        rng=rng,
         threshold_a_priori=0.5,
     )
 
@@ -97,11 +100,14 @@ def test_run_binary_2() -> None:
         ("s3", [1], [0.4]),
     ]
 
+    rng = numpy.random.default_rng(42)
+
     # a change in the threshold should not affect auc and average precision scores
     results = run(
         "test",
         predictions,
         binning=10,
+        rng=rng,
         threshold_a_priori=0.3,
     )
 
-- 
GitLab