Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Fix #19442 minimally #19443

Merged
merged 1 commit into from Oct 28, 2023
Merged

Conversation

musicinmybrain
Copy link
Contributor

@musicinmybrain musicinmybrain commented Oct 27, 2023

Reference issue

Closes #19442.

What does this implement/fix?

This fixes #19442 minimally by parameterizing test_b_orthonormalize over a sorted-list version of the set REAL_DVALUES.

Additional information

As reported in #19442 (comment), I tried paramet(e)rizing over VDTYPES instead, but the tests involving complex dtypes failed.

Future work could perhaps make this test pass with VDTYPES, and perhaps even add a test with complex dtypes having complex values, as suggested at the end of #19442 (comment).

Use a sorted version of the set REAL_DTYPES to parameterize
test_b_orthonormalize.
Copy link
Contributor

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm "ok" with this fix. I couldn't reproduce locally, even with a huge number of replicate tests via pytest-repeat (python dev.py test -j 8 -t scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py::test_b_orthonormalize -- --count=1000) on latest main, but since the pytest-xdist docs (and intuition) clearly support your claim, I think this is fine to merge.

I noticed discussion of other more systematic improvements related to these tests in the matching issue, but I think patching the immediate/simplest problem first is fine here for now.

@tylerjereddy tylerjereddy merged commit dc99e22 into scipy:main Oct 28, 2023
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.sparse.linalg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Error collecting tests due to inconsistent parameterization order in test_b_orthonormalize
2 participants