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 tests #5

Open
pwnfoo opened this issue Oct 6, 2017 · 1 comment
Open

Add tests #5

pwnfoo opened this issue Oct 6, 2017 · 1 comment

Comments

@pwnfoo
Copy link
Owner

pwnfoo commented Oct 6, 2017

TSSIA

@Double-A-92
Copy link

Double-A-92 commented Oct 10, 2017

For unit tests to make sense you first have to refactor the code into smaller units.
Especially the _do_ocr_and_lookup funcion is way too big and handles 3-4 responsibilities, when it could actually be split very nicely.

E.g. do_ocr would be a nice testable unit. Input an image and get username and text back, no need to worry about the twitter api or anything else in that function.

Other functions woud be get_user_tweets, compare_ocr_with_tweet_list, print_results, ...

Maybe I'll give it a try tomorrow... :)

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