-
Notifications
You must be signed in to change notification settings - Fork 7
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
should_not assertion message incorrect #18
Comments
thanks for the report @lerovitch! That a strange use case, although it should probably be supported too. The same can be accomplished with the following expression:
|
well, omit the first assert >>> import mock
>>> spam = mock.MagicMock()
>>> spam.eggs({'foo': 'foo', 'bar': 'bar'})
>>> from pyshould import should_not
>>> spam.eggs.assert_called_with(should_not.have_key('foo'))
AssertionError: Expected call: eggs(a dictionary containing key 'foo')
Actual call: eggs({'foo': 'foo', 'bar': 'bar'}) Also, thx for your advice as it's better to concatenate assertions with operators like 'and' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The message should say something like
The text was updated successfully, but these errors were encountered: