Skip to content

Add equality-based dispatchers for testing #40

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

Merged
merged 9 commits into from
Mar 9, 2015
Merged

Add equality-based dispatchers for testing #40

merged 9 commits into from
Mar 9, 2015

Conversation

radix
Copy link
Contributor

@radix radix commented Mar 4, 2015

Some really simple dispatchers for testing.

  • Give EQDispatcher a map like {MyIntent('foo'): 'bar'} and MyIntent('foo') will be performed to have the result 'bar'.
  • Give EQFDispatcher a map like {MyIntent('foo'): lambda i: 'bar'}, and likewise.

@tomprince I'd appreciate your feedback :)

An Equality-based function dispatcher.

This dispatcher looks up intents by equality and performs them by invoking
an associated function.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to document that the function needs to take a single argument: the intent

@cyli
Copy link

cyli commented Mar 9, 2015

Non-blocking - Should there be tests for catch? It is pretty simple, but for full test coverage... :)

@cyli
Copy link

cyli commented Mar 9, 2015

LGTM on travis +1 :)

@radix
Copy link
Contributor Author

radix commented Mar 9, 2015

Thank you very much @cyli!

radix added a commit that referenced this pull request Mar 9, 2015
Add equality-based dispatchers for testing
@radix radix merged commit a950a44 into master Mar 9, 2015
@radix radix deleted the eq-dispatcher branch March 9, 2015 23:08
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.

2 participants