Repository navigation
Fix test infrastructure issues and remove tests_external - #3103
Merged
Merged
Conversation
The default -m "not slow" set in pytest_configure already deselects slow tests. The extra skip in pytest_collection_modifyitems checked the -m expression for the substring "not slow", so it also skipped slow tests under -m "slow or not slow", which the comment documents as the way to run all tests.
These third-party tests skip when the allocation fails, but they caught MemoryError. dpnp raises USMAllocationError, which does not derive from MemoryError, so on devices with a small maximum allocation size they failed instead of skipping.
skipped_tests_gpu_no_fp64.tbl was deleted once its last entry was gone, but conftest.py still tried to load it on GPUs without fp64 support.
The flags were read with bool(os.getenv(...)), so any non-empty value, including "0", enabled them. Unset, empty, "0", "false", "no" and "off" now mean disabled.
The runner is not used by CI, has not worked since NumPy 2.0, and its skip lists no longer match the node IDs pytest produces. Also remove the numpy_ext wrapper that only called it.
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
October 14, 2026 19:58
antonwolfy
added a commit
that referenced
this pull request
Oct 14, 2026
-m "slow or not slow" now runs slow tests, "0" disables the test env flags, and large-allocation tests skip on USMAllocationError.
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3103/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev15=np2py314h8d9cdd5_22 ran successfully. |
Collaborator
Comment out the get_default_memory_pool() calls in the slow test_empty_int_huge_size tests, since dpnp has no memory pool API. Drop the redundant bool() wrapper and read DPNP_QUEUE_GPU with _getenv_bool for consistency with the other test env flags.
vlad-perevezentsev
self-requested a review
October 23, 2026 08:15
vlad-perevezentsev
approved these changes
Oct 23, 2026
vlad-perevezentsev
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Thank you @antonwolfy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes several test infrastructure issues, one commit per fix:
-m "slow or not slow"skipped slow tests.pytest_configurealready sets-m "not slow"by default, which deselects slow tests. A second check inpytest_collection_modifyitemsadded a skip mark to slow tests whenever the-mexpression contained the substring"not slow", so-m "slow or not slow", documented as the way to run all tests, still skipped them. The redundant check is removed; the default run and-m slowbehave as before.MemoryError. dpnp raisesUSMAllocationError, which does not derive fromMemoryError, so on devices with a small maximum allocation size they failed. They now catchUSMAllocationError.conftest.pystill tried to loadskipped_tests_gpu_no_fp64.tblon GPUs without fp64 support, although the file was deleted once its last entry was gone."0"enabled test env flags.DPNP_TEST_ALL_INT_TYPES,DPNP_TEST_FLOAT_16,DPNP_TEST_COMPLEX_TYPES,DPNP_TEST_BOOL_TYPESandDPNP_INFRA_WARNINGS_ENABLEwere read withbool(os.getenv(...)), so any non-empty value, including0, turned them on. Unset, empty,0,false,noandoffnow mean disabled, and any other value still enables them.SKIP_TENSOR_TESTSuses the same parsing.tests_external. The runner is not used by CI, has not worked since NumPy 2.0 (it importsnumpy.core._rational_tests), and its skip lists no longer match the node IDs pytest produces. Thedpnp/tests/third_party/numpy_extwrapper, which only called it, is removed too.Tested locally on an Intel GPU with a 1 GiB maximum allocation size and on the OpenCL CPU device:
dpnp/tests/test_fft_gil.py: the default run deselects its 2 slow tests, and both-m slowand-m "slow or not slow"run and pass them (before,-m "slow or not slow"skipped them with "Skipping slow tests").USMAllocationErroron the GPU now skip.SKIP_TENSOR_TESTS=1.TestNansumNanprodHugestill fails on such devices, becausedpnp.nansumallocates a temporary larger than the device limit inside the test; that needs a separate change.