-
-
Notifications
You must be signed in to change notification settings - Fork 877
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
make tests more approachable #1045
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
like the idea! |
adehad
force-pushed
the
feature/makes_tests_more_approachable
branch
from
May 18, 2021 18:26
26e3ac7
to
a47498f
Compare
Quite a diff :-) |
it really is a bad habit of mine haha |
delete-merged-branch
bot
deleted the
feature/makes_tests_more_approachable
branch
June 19, 2021 11:29
svermeulen
pushed a commit
to svermeulen/jira
that referenced
this pull request
Oct 31, 2021
* new files * update readme on how to debug tests * xpass now true pass * test exceptions, remove bad CI logic * resolution * fix merge, use user_normal instead of user_admin * add message to top of tests.py to guide new contributors * cleanup testmanager init
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
tests.py
file into a series of smaller files.conftest.py
to store the helper methods together with a new base test case for easy access to the same jirasetUp()
broken_test
shortcut to help with consistencyJIRAError
that was supposed to be CI specific, but ended up doing exactly the same thing as normaljira.exceptions
coverageChange Reasoning:
The single test file with >2000 lines was not approachable to new/casual contributors. This made it more likely for bugs to sneak in.
The changes in this PR move the test
setUp()
and other helper methods into a separateconftest.py
. This makes the actual test files simpler to understand.The test files have also been named to be easier to to find where a new test should belong.
i.e. I have added a new feature relating to
Attachment
I can add a test intest_attachment.py
.Hopefully this naming scheme also makes it easier to remember that you can run
tox -e py39 -- tests/resources/test_attachment.py
to only test those tests.I also think this approach may help a contributor who just wants to add tests, they can look at a coverage report, pick a test they want to add and probably find what file they should add the test to pretty quickly.
Todo
Add a helper method towon't do hereJiraTestCase
to skip if on Cloud/Server?