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

Allow a callable to be passed as the message argument to wait #21

Open
jimfulton opened this issue Mar 8, 2018 · 3 comments
Open

Allow a callable to be passed as the message argument to wait #21

jimfulton opened this issue Mar 8, 2018 · 3 comments

Comments

@jimfulton
Copy link
Member

To allow debugging information to be included in failure exceptions. This would play the same role as the expression in an assert statement.

@icemac
Copy link
Member

icemac commented May 2, 2018

@jimfulton Could you provide a code example? I have no idea what you mean.

@jimfulton
Copy link
Member Author

wait((lambda : foo == 0), message=lambda : 'foo non-zero: {}'.format(foo))

Note that this allows us to see what foo actually is, without having to resort to pdb.

@icemac
Copy link
Member

icemac commented May 9, 2018

Ah, you seem to be talking about https://github.com/zopefoundation/zope.testing/blob/master/src/zope/testing/wait.py. Sorry for my ignorance, I did not even know that this module exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants