Skip to content

Commit

Permalink
TST: fix two test failures that showed up on conda-forge
Browse files Browse the repository at this point in the history
The ppc64le one is a small test bump. The PyPy-on-Windows one
is a real bug in PyPy, but it's not planned to be fixed any time
soon, so the test is xfail-ed here.

Closes scipygh-18632

[skip circle] [skip cirrus]
  • Loading branch information
rgommers authored and tylerjereddy committed Jun 13, 2023
1 parent 5291233 commit e971d05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scipy/optimize/tests/test__shgo.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import logging
import sys

import numpy
import numpy as np
import time
from multiprocessing import Pool
from numpy.testing import assert_allclose
from numpy.testing import assert_allclose, IS_PYPY
import pytest
from pytest import raises as assert_raises, warns
from scipy.optimize import (shgo, Bounds, minimize_scalar, minimize, rosen,
Expand Down Expand Up @@ -690,6 +691,8 @@ def test_9_cons_g(self):
"""Test single function constraint passing"""
SHGO(test3_1.f, test3_1.bounds, constraints=test3_1.cons[0])

@pytest.mark.xfail(IS_PYPY and sys.platform == 'win32',
reason="Failing and fix in PyPy not planned (see gh-18632)")
def test_10_finite_time(self):
"""Test single function constraint passing"""
options = {'maxtime': 1e-15}
Expand Down
2 changes: 1 addition & 1 deletion scipy/special/tests/test_hypergeometric.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_geometric_convergence(self, a, b, x, result):
])
def test_a_negative_integer(self, a, b, x, result):
# Desired answers computed using Mpmath.
assert_allclose(sc.hyp1f1(a, b, x), result, atol=0, rtol=1e-14)
assert_allclose(sc.hyp1f1(a, b, x), result, atol=0, rtol=1.5e-14)

@pytest.mark.parametrize('a, b, x, expected', [
(0.01, 150, -4, 0.99973683897677527773), # gh-3492
Expand Down

0 comments on commit e971d05

Please sign in to comment.