-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Delete duplicates of unit tests #5461
Conversation
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 your pull request.
This is not a complete review, just a few comments about some things that I think could be improved in the code.
I think that you'll need to add a test case to ensure that your duplication removal works correctly and keeps working.
71c50af
to
5b8c69a
Compare
cb7069e
to
34f6de4
Compare
This does not seem to break anything but as @bjorng pointed out we would like to have a test to ensure that it works and keeps working. |
One test case is added. Could you please help me understand - what other tests you expected from my side? |
Oh, now I see the test. I expect the test to be in the test suite and not in the src code.
|
Should I move this test to eunit_SUITE.erl or we can keep it as is? |
Please move it. |
7daa637
to
c3d4a4a
Compare
@IngelaAndin done. |
i browsed the code related to this functionality and seems to me that it is not tested that well. I'm thinking about following inputs to eunit:test calls (apart from input already proposed):
I assume that should be quite simple, if some generic code is brought into test case. Maybe list above could be a list of tuples combining {TestInput, ExpectedExecutionResults} and then consumed by test case ... Having a dummy Eunit test in eunit module (location as originally proposed but for example returning ok) might be a good idea. Not for the purpose of executing it directly, but for the purpose of using it as an input to test case now located in eunit_SUITE and verifying the behavior. |
Remove duplicates in tests before run unit. This is need for case if in tests will be used duplicates with/without prefix, example: * Input - [issue, issue_tests] * Output - [issue]
c3d4a4a
to
4bf53f3
Compare
@u3s many thanks! Yep, I'm miss of some test points. Fixed. |
|
The output looks exactly as I expected(as it was difficult for me to choose what to leave on the list - so I left without a prefix - the main issue was - what name should be prioritized with or without prefix during duplication?). Yes, previous implementations was work as input But as I mention before it was difficult for me to determine the priority of tests because of this, I gave priority to modules without a prefix. But maybe this is not what your team expects, so, I will waiting for feedback in next week and maybe it might be worth implementing a different approach. Thanks. P.S. To be honest, I don't really like this approach either which is provided in current PR, maybe need change it as: |
Summary of discussion we had about this change. OPTION 1
OPTION 2
Proposal for OPTION 1
Proposal for OPTION 2
|
@u3s many thanks for feedback! I need spend some time to take a look into it a little big closer. As soon as I have any updates, I will share them here or update the PR with separate commits. |
any updates? |
Was need to switch to other stuff. I hope will try to improve this PR till end of next week. |
please let us know if you plan to work on that one or you have different priorities right now and would like us to take over this one. |
Yes, I want to work on it. But at the same time I have some important tasks which has become a little more lately than I expected ... So, if you feel that it would be more productive if your team took on this task - please go ahead. If by some reason we will provide implementations at the same time, I will not insist on the adoption of my PR - because it doesn't matter who fixes it, what matters is that the fix will provided 🙃. |
OK. I will let you know if I start working on it, to reduce risk of unnecessary duplicated work. |
This PR was replaced with #6157 which implements description from section "Proposal for OPTION 1" above. |
Great news! Many thanks for let me know! |
Remove duplicates in tests before run unit.
This is need for case if in tests will be used duplicates
with/without prefix, example:
[issue_tests, issue]
[issue]
Related to #3064