-
Notifications
You must be signed in to change notification settings - Fork 52
Shrink our gigantic tests! #115
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
Conversation
Heads up! This PR modifies the following files:
|
gotta fix the flake8 stuff... |
It might be worth taking a look at the failed Travis build! 😄 |
@jdm I think it's still buggy, but well, this is just a prototype. I'm curious whether this would be useful if I make it to work. |
New code was committed to pull request. |
Now, this is progress! (still, 3 tests fail) |
New code was committed to pull request. |
All the tests pass now, but I had to put some type conversions to integrate the lint. |
After trying to integrate this into highfive (for a while now), I realize that the entire problem lies on creating the tests, where we read the JSON files twice (one for the initial/expected stuff), and the other for payload. I think I should modify the linter to take objects instead of going directly for the file. |
New code was committed to pull request. |
only the command-line argument is left to go... |
New code was committed to pull request. |
I'm finally satisfied with the output 😄 |
☔ The latest upstream changes (presumably #118) made this pull request unmergeable. Please resolve the merge conflicts. |
New code was committed to pull request. |
New code was committed to pull request. |
New code was committed to pull request. |
2 similar comments
New code was committed to pull request. |
New code was committed to pull request. |
This is ready for review! |
New code was committed to pull request. |
New code was committed to pull request. |
@@ -55,7 +55,7 @@ def on_pr_opened(self, api, payload): | |||
pr = payload["pull_request"] | |||
# If the pull request already has an assignee, | |||
# don't try to set one ourselves. | |||
if pr["assignee"] != None: | |||
if pr["assignee"] != None: # NOQA (silence flake8 here) |
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.
What is it complaining about?
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.
flake8 prefers is not None
, but we need !=
to call our overridden __ne__
method (the former checks for an exact match of the object, which will fail during testing)
The need for |
New code was committed to pull request. |
True, they are bad, but I couldn't find a way around them. I've fixed some of them, and now we have only three situations (in regex matching) where |
Thanks! |
Thanks for reviewing it :) |
Adding tests for `api_req`
This makes use of a simple wrapper around the JSON object and marks stuff whenever we 'get' something from the dictionary (using
[]
). This can help shrink the gigantic tests we currently have (which has a hell lot of unused key/val)