Skip to content

Commit

Permalink
Add xgboost version regression test.
Browse files Browse the repository at this point in the history
BUG=175051617
  • Loading branch information
rosbo committed Dec 7, 2020
1 parent cb38e56 commit d60116a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_xgboost.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import unittest

import xgboost

from distutils.version import StrictVersion
from sklearn import datasets
from xgboost import XGBClassifier

class TestXGBoost(unittest.TestCase):
def test_version(self):
# b/175051617 prevent xgboost version downgrade.
self.assertGreaterEqual(StrictVersion(xgboost.__version__), StrictVersion("1.2.1"))

def test_classifier(self):
boston = datasets.load_boston()
X, y = boston.data, boston.target
Expand Down

0 comments on commit d60116a

Please sign in to comment.