-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 functional tests directories structure #5753
Add test for functional tests directories structure #5753
Conversation
Actually I had some code ready but I delayed pushing it as there was a misnamed symlink that was not very straightforward to rename. I modified the pylint/testutils/functional code. Let me open a MR with the current code so as to discuss this. (Edit : See #5757) |
For some reason this test passes locally... So I need to push to see what's wrong π |
So, this finally passes.. |
Pull Request Test Coverage Report for Build 1826358503
π - Coveralls |
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.
I think we could either:
- add your check in the check function in Add assert for functional tests directories structureΒ #5757
or
- move the assert from testutil into this test function instead
But right now 5757 lacks a feature and there is a dissemination of structure check in this one. I think I prefer option 1 because it would permits to provide the structure to users of pylint/testutil
.
dd3a8ed
to
9a75391
Compare
I rebased Daniel works into the two first commits then moved the test to |
I'm still working on it :) |
@Pierre-Sassoulas Still working on this? Or want me to try and get this ready? |
I'm still working on it but could push the half-baked work in progress I have locally. There's an issue with moving some of the functional tests that have 48+ files in their directory. They are not entirely independents as they import each others so moving them break the tests. The easy fix is to change the imports, the real fix would be to make them independent. I often don't have a long enough uninterrupted period to do the real fix. |
If you push the in progress work I'll take a look! |
9a75391
to
e9aff5d
Compare
I just did :) The 3 last commits are temporary garbage. |
29193f5
to
64e8b2a
Compare
I think this is now good to go! Edit: Coverage report is false. Those lines are already uncovered on NOTE: PLEASE DON'T SQUASH. We can use https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame to ignore the moving commit from git blame so that we don't lose easy access to relevant commits in git blame viewers (such as the one in VS Code). |
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.
Sorry for the delay in reviewing. LGTM but a conflict appeared and we can't squash so we should rebase on latest main. Let me do it then.
64e8b2a
to
96e67ee
Compare
Type of Changes
Description
Based on the discussion in #5474.
I'm not sure this is the best way to test this, but it ensures new contributors will run it as they are likely to run the
pytest
command at least once.The test checks that a functional test should not be move to a sub-directory (
use_test
should go inu/use
) and that it is not in the incorrect directory (using_test
should not go inu/use
).I made two directories as the tests in those directories really do not follow this pattern and I don't think it makes too much sense to change all the tests names there.