test: cover osw.utils.util.parallelize - #154
Open
LukasGold wants to merge 1 commit into
Open
Conversation
- result ordering, kwargs forwarding, empty and non-list iterables - concurrency guarded by a barrier instead of wall-clock timing - both failure modes: propagate first exception, or collect in place - the already-running event loop path used from notebooks - closes #25
Contributor
Release previewNo version bump from the current commits (stays at Changelog preview (truncated)Preview via python-semantic-release and conventional commits. |
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.
Closes #25
Changes
Adds
tests/utils/parallelize_test.py. No production code changes.Covered:
rangereturn_exceptions=False(default): the first exception propagatesreturn_exceptions=True: exceptions land at their own index, neighbours survive, every item is still attemptedThe
return_exceptionscases are a regression guard for the silent-drop fix in #132.Note on the concurrency test
It uses a
threading.Barrierrather than wall-clock timing: the barrier only clears if all items are in flight at once, so serialized execution fails deterministically instead of flaking under CI load.Observation, not changed here
Under
MODE = "asyncio", bothflush_at_endandprogress_barare inert.flush_at_endis only read in theMODE == "dask"block, and the asyncio branch callstqdm.gatherunconditionally without checkingprogress_bar. The tests deliberately assert nothing about either, so they do not lock in dead behaviour. Worth a separate issue if those parameters should work or be removed.