-
Notifications
You must be signed in to change notification settings - Fork 3k
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
eunit: exact execution option #6157
eunit: exact execution option #6157
Conversation
u3s
commented
Jul 15, 2022
- option for avoiding automatic execution of a module with "_tests" suffix
CT Test Results 2 files 12 suites 3m 10s ⏱️ Results for commit dd366cb. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
|
ebb1cda
to
a272af7
Compare
lib/eunit/src/eunit_data.erl
Outdated
@@ -573,22 +574,24 @@ get_module_tests(M) -> | |||
throw({module_not_found, M}) | |||
end. | |||
|
|||
get_module_tests_1(M, Es) -> | |||
get_module_tests_1(M, Es, Options) -> |
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.
So I know this is not part of your change, just an observation that the very short variable names make the code hard to read I think. A few more characters that would make it easier to get the correct association without analyzing the context could be beneficial. It could perhaps be an enhancement if you think it is worth the time.
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 agree with observation. Unfortunately this is a style eunit code is written :-/ There is limited number of tests of application as well.
I will see what can be improved for eunit_data module - assuming some time box for activity.
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've pushed a commit please have a look and let me know what you think
IMHO, result is a better clarity of the code (at least for non eunit expert) but it is costly to implement and then review.
Not to mention the risk of messing up with logic accidentally and releasing it due to limited test coverage ...
- option for avoiding automatic execution of a module with "_tests" suffix
dd366cb
to
c194380
Compare