Skip to content

fix: handle partial objects in wait_for_predicate timeout message#795

Open
nkatha23 wants to merge 1 commit intobitcoin-dev-project:mainfrom
nkatha23:fix/test-base-inspect-partial
Open

fix: handle partial objects in wait_for_predicate timeout message#795
nkatha23 wants to merge 1 commit intobitcoin-dev-project:mainfrom
nkatha23:fix/test-base-inspect-partial

Conversation

@nkatha23
Copy link

@nkatha23 nkatha23 commented Feb 26, 2026

Found this while investigating a CI failure on PR #791. plugin_test was timing out, but instead of seeing the real timeout error, CI was throwing a confusing TypeError because inspect.getsource() doesn't support functools.partial objects. This fix makes the error reporting robust by falling back to repr() when getsource() fails, so the actual timeout reason is visible instead of a misleading TypeError.

inspect.getsource() cannot handle functools.partial objects, causing a
TypeError that masks the original timeout error. Fall back to repr()
if getsource fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant