Skip to content
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

Change of thread name to "impl" #28

Closed
Panke opened this issue Jun 24, 2023 · 2 comments
Closed

Change of thread name to "impl" #28

Panke opened this issue Jun 24, 2023 · 2 comments

Comments

@Panke
Copy link

Panke commented Jun 24, 2023

Thanks for test-log! I am using it together with https://insta.rs/docs/ and insta takes the snapshot name from the thread name a thread runs in. This us usually the name of the test function.

test-log changes the name of the thread to impl which breaks this workflow. I currently circumvent it by naming all snapshots manually, but ofc it would be better if that wouldn't be needed.

@d-e-s-o
Copy link
Owner

d-e-s-o commented Jun 30, 2023

I don't believe test-log touches thread names. So we'd have to understand based on what these change.

@tamird
Copy link
Contributor

tamird commented Oct 5, 2023

I think insta takes the snapshot name from the function name, rather than the test name. Prior to #30, test-log generates an inner function called test_impl, which could be the cause of this issue.

tamird added a commit to tamird/test-log that referenced this issue Oct 5, 2023
There's no need to inspect the test case so deeply; all this macro wants
to do is insert a prelude - so do that and expand the rest as-is.

This removes the inner function `test_impl`, which is the suspected
cause of d-e-s-o#28.

Closes d-e-s-o#28.
tamird added a commit to tamird/test-log that referenced this issue Oct 9, 2023
There's no need to inspect the test case so deeply; all this macro wants
to do is insert a prelude - so do that and expand the rest as-is.

This removes the inner function `test_impl`, which is the suspected
cause of d-e-s-o#28.

Closes d-e-s-o#28.
d-e-s-o pushed a commit that referenced this issue Oct 11, 2023
There's no need to inspect the test case so deeply; all this macro wants
to do is insert a prelude - so do that and expand the rest as-is.

This removes the inner function `test_impl`, which is the suspected
cause of #28.

Closes #28.
d-e-s-o added a commit that referenced this issue Oct 13, 2023
This change bumps the version of the crate to 0.2.13. The following
notable changes have been made since 0.2.12:
- Improved interaction with nested attributes (such as those used by the
  test_case crate), that may not have been parsable in the past
- Removed generated test_impl function, which could have "leaked" into
  test cases (#28)
- Eliminated dependency on tracing crate
- Bumped minimum supported Rust version to 1.56
- Bumped syn dependency to 2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants