-
Notifications
You must be signed in to change notification settings - Fork 69
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 test for CLI tool #170
Conversation
Thank you for the pull request!The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you! Maintainer checklist
|
Hey, @mhmohona! 👋 I noticed the tests appear to be failing when running in the CI. Did notice also though that the screenshot in the PR description shows the tests do run OK when |
Thank you @wkyoshida for looking into this. The thing is this tests passes when everything is in one place. I mean all the files, total.py, list.py, query.py is in one branch, then these tests works without any error. Both unittest and Pytest passes. I tried it locally and it passes as you can see in screenshot. |
Ok so the tests are passing, but then a question I have is when are the tests that we have written here ran? Is it possible to move the tests for the CLI into the Scribe-Data/tests directory such that they're ran as a part of the pytest suite? |
Would you be able to make this change, @mhmohona? Let us know if you have any questions! |
I will work on it. |
@mhmohona, just updated both your branches as there have been tons of changes recently. Let us know if there's anything we can do to support with these! |
@andrewtavis @wkyoshida this PR is up for review now. |
|
||
def test_list_data_types_no_data_types(self): | ||
with self.assertRaises(ValueError): | ||
list_data_types("Klingon") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe one day could be a language 😅 Wikidata does have data for it 😇 But fine for now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing all of these tests, @mhmohona! Great that the Scribe community is focussing so much more on tests these days 😊
call(), | ||
call('Available data types: All languages'), | ||
call('-----------------------------------'), | ||
call('emoji-keywords'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - just noting something down here that came to mind just now..
Concerning the discussion we had on providing package options without PyICU and consequently the emoji functionality - omitting emoji-keywords
as an available data type in the command output will probably be a good idea. With that, testing that the appropriate options are getting outputted given whether with/without PyICU might be good too.
...but! That's for when we get there 😉
Contributor checklist
Description
Related issue