-
Notifications
You must be signed in to change notification settings - Fork 34
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
#[test_log::test(test_case::test_case)]
doesn't work with multiple cases
#35
Comments
I am not sure I completely understand the proposal. How would we be able to detect that fact? Aren't both |
I'm afraid I waited too long to file this proposal and have forgotten some of the details. That said it's empirically true that |
Alternately, maybe it would be possible to offer a separate attribute for those cases when passing it as an attribute is not sufficient. For example tracing_test uses a separate attribute. Of course, user will then need to be careful to order the attributes correctly. |
This way if preceding test macros add `#[::core::prelude::v1::test]` by appending, then we can avoid duplicated test runs. See also frondeus/test-case#101, frondeus/test-case#143 Closes d-e-s-o#35.
Spin-off from #30.
It is not possible to write
#[test_case(...)]
tests with multiple cases. For exampledoes not work.
I think the approach of wrapping other test macros such as
tokio::test
andtest_case::test_case
in thetest_log::test
macro ends up being inflexible for such cases and it's probably better to abandon it in favor ofparsing other attributes on the test function and inserting
#[test]
only if nothing else has already done it. Thiswould mean that ordering of attributes would start to matter but this is already the case when
test_case::test_case
iscomposed with
tokio::test
;test_case
has to come first or else compilation fails with"functions used as tests can not have any arguments"
.The text was updated successfully, but these errors were encountered: