-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix non-ignored test, check all tests are executed #4262
Conversation
types: [jupyter] | ||
entry: python scripts/check_toc_is_complete.py | ||
- id: check-no-tests-are-ignored |
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.
this is the only new hook here, in the others I just sorted the keys
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.
Good call adding this hook 👍
ignored_tests = set(re.findall(r"(?<=--ignore=)(pymc3/tests.*\.py)", txt)) | ||
non_ignored_tests = set(re.findall(r"(?<!--ignore=)(pymc3/tests.*\.py)", txt)) | ||
assert ( | ||
ignored_tests <= non_ignored_tests |
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.
note: these are sets, so <=
means "is a subset of"
Codecov Report
@@ Coverage Diff @@
## master #4262 +/- ##
==========================================
- Coverage 88.15% 88.14% -0.02%
==========================================
Files 87 87
Lines 14243 14243
==========================================
- Hits 12556 12554 -2
- Misses 1687 1689 +2
|
32m 8s ... nearly broke half-hour, GHA is really impressive |
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.
Good catch @MarcoGorelli! Thanks for the comments in the PR, makes it easier to review 👍
It seems that Travis is still doing its thing though -- I thought @twiecki had deactivated it 🤔
types: [jupyter] | ||
entry: python scripts/check_toc_is_complete.py | ||
- id: check-no-tests-are-ignored |
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.
Good call adding this hook 👍
I think I disabled it, not sure why it still shows up... |
No that has nothing to do with it, somehow travis is still installed but but non-functional but I can't find where. |
In
.github/workflows/pytest.yml
there was--ignore=pymc3/tests/test_shape_handling
instead of--ignore=pymc3/tests/test_shape_handling.py
😳 . So, fixed + pre-commit check to ensure all tests are executed added