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

Support fuzzy argument match #19

Open
awestendorf opened this issue Apr 25, 2014 · 0 comments
Open

Support fuzzy argument match #19

awestendorf opened this issue Apr 25, 2014 · 0 comments

Comments

@awestendorf
Copy link
Member

Sometimes it's not necessary to test for all kwargs, just a few specific ones. This can be done now with expect(..).args(.., x=ignore()), but you need to do that for each named parameter. One of the following APIs might be better:

expect(..).args(.., **ignore())

or

expect(..).like(..)

Wouldn't have to re-use ignore in the first case, a new comparator could be introduced. If **ignore() is supported, *ignore() should be as well. That could all be very crazy, but not out of the question.

The second case is something I've thought about for awhile, where it would be a fuzzy match on *a, **k, such that only the first N values in the test case would be compared against *a, and only the named parameters of the test case would be compared against **k.

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

No branches or pull requests

1 participant