Skip to content

Commit

Permalink
Skipping LogReg test for older sklearn versions
Browse files Browse the repository at this point in the history
  • Loading branch information
naoise-h committed Jan 23, 2024
1 parent fecf088 commit 962b31f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/models/test_LogisticRegression.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import numpy as np
from unittest import TestCase
from unittest import TestCase, skipIf

from diffprivlib.models.logistic_regression import LogisticRegression
from diffprivlib.utils import PrivacyLeakWarning, DiffprivlibCompatibilityWarning, BudgetError
from sklearn import __version__ as sklearn_version


class TestLogisticRegression(TestCase):
Expand Down Expand Up @@ -151,6 +152,7 @@ def test_different_results(self):

self.assertTrue(np.any(predict1 != predict2) or np.any(predict1 != predict3))

@skipIf(sklearn_version < "1.4", "The penalty was scaled incorrectly in previous versions (Scikit-Learn GH 26721)")
def test_same_results(self):
from sklearn import datasets
from sklearn.model_selection import train_test_split
Expand Down

0 comments on commit 962b31f

Please sign in to comment.