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

Add fuzzy text matching assertion #8

Open
jamo opened this issue Dec 27, 2015 · 3 comments
Open

Add fuzzy text matching assertion #8

jamo opened this issue Dec 27, 2015 · 3 comments

Comments

@jamo
Copy link
Member

jamo commented Dec 27, 2015

create assertMatches(String, String) or similar which could be used in the tests for testing whether printed text matches expectations but let's some typos etc. thru.

Maybe we could have some kind of level of strictness.

There are plenty of fuzzy match algos so it should be rather easy to implement.

@mpartel
Copy link
Member

mpartel commented Dec 31, 2015

What are some examples where this would be better than assertContains?

@jamo
Copy link
Member Author

jamo commented Dec 31, 2015

Like when we ask for students to print:
type a number: and the student prints type number -- now the tests keeps on focusing to whine about the incorrectly typed in text, when we rarely need to whine about typos.
This would be useful especially with computer exam situations, where we in general want to be more generous about typos etc.

@mpartel
Copy link
Member

mpartel commented Dec 31, 2015

Ok, that case makes sense (though I suppose you could alternatively ignore the text of the prompt, or work to improve the error messages). Will have to be careful about not making the implementation too permissive.

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

2 participants