Skip to content

Commit

Permalink
TST: adjust new array API test, slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdhaber committed May 4, 2024
1 parent 9c9122a commit ad538ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scipy/linalg/tests/test_extending.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scipy.linalg.lapack import dgtsv # type: ignore[attr-defined]


@pytest.mark.fail_slow(30)
@pytest.mark.fail_slow(60)
# essential per https://github.com/scipy/scipy/pull/20487#discussion_r1567057247
@pytest.mark.skipif(IS_EDITABLE,
reason='Editable install cannot find .pxd headers.')
Expand Down
2 changes: 1 addition & 1 deletion scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def Mf32precond(x):
# This is one of the slower tests because there are >1,000 configs
# to test here. Flip a biased coin to decide whether to run each
# test to get decent coverage in less time.
if rnd.random() < 0.95:
if rnd.random() < 0.98:
continue # too many tests
eigvals, _ = lobpcg(A, X, B=B, M=M, Y=Y, tol=1e-4,
maxiter=100, largest=False)
Expand Down
2 changes: 1 addition & 1 deletion scipy/stats/tests/test_hypotests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ def test_exact_pvalue(self, statistic, m, n, pval):
# The values are taken from Table 2, 3, 4 and 5
assert_equal(_pval_cvm_2samp_exact(statistic, m, n), pval)

@pytest.mark.slow
@pytest.mark.xslow
def test_large_sample(self):
# for large samples, the statistic U gets very large
# do a sanity check that p-value is not 0, 1 or nan
Expand Down
6 changes: 3 additions & 3 deletions scipy/stats/tests/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2650,13 +2650,13 @@ def test_sem(self, xp):
y = stats.sem(testcase)
xp_assert_close(y, xp.asarray(0.6454972244))
n = len(self.testcase)
assert_allclose(stats.sem(testcase, ddof=0) * (n/(n-2))**0.5,
xp_assert_close(stats.sem(testcase, ddof=0) * (n/(n-2))**0.5,
stats.sem(testcase, ddof=2))

x = xp.arange(10.)
x[9] = xp.nan
assert_equal(stats.sem(x), xp.asarray(xp.nan))
xp_assert_equal(stats.sem(x), xp.asarray(xp.nan))

@skip_xp_backends(np_only=True,
reasons=['`nan_policy` only supports NumPy backend'])
def test_sem_nan_policy(self, xp):
Expand Down

0 comments on commit ad538ec

Please sign in to comment.