Skip to content

Commit

Permalink
Fix test suite to account for beta numpy versions (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny authored Aug 29, 2023
1 parent 1862d94 commit 4464447
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/optimizers/test_optimizers_scikitquant.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def test_bobyqa(self):
self.skipTest(str(ex))

@unittest.skipIf(
tuple(map(int, numpy.__version__.split("."))) >= (1, 24, 0),
# NB: numpy.__version__ may contain letters, e.g. "1.26.0b1"
tuple(map(int, numpy.__version__.split(".")[:2])) >= (1, 24),
"scikit's SnobFit currently incompatible with NumPy 1.24.0.",
)
def test_snobfit(self):
Expand All @@ -75,7 +76,8 @@ def test_snobfit(self):
self.skipTest(str(ex))

@unittest.skipIf(
tuple(map(int, numpy.__version__.split("."))) >= (1, 24, 0),
# NB: numpy.__version__ may contain letters, e.g. "1.26.0b1"
tuple(map(int, numpy.__version__.split(".")[:2])) >= (1, 24),
"scikit's SnobFit currently incompatible with NumPy 1.24.0.",
)
@data((None,), ([(-1, 1), (None, None)],))
Expand Down

0 comments on commit 4464447

Please sign in to comment.