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

Figure out a way to support checking #[async_attributes::test] in doctests #22

Open
Fishrock123 opened this issue Jan 29, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Fishrock123
Copy link
Member

It would be very valuable for documenting test utils to have cargo check be able to run on #[async_attributes::test] function in doctests.

For example, the obvious errors here would have been caught, as it clearly can't compile: https://github.com/eaze/preroll/blob/c0d15ef0692ef8f933d3501a708f38f0acd69c9a/src/test_utils/mod.rs#L42-L53 (Wrong naming of create_app.)

Unfortunately, `cfg(doctest) seems like it broken and there perhaps is no obvious (or certainly easy) way to fix it, and doesn't seem to be garnering any action: rust-lang/rust#67295

I suggest we find some (even if convoluted) way to run these in doc tests, even if by a manual feature flag.

@Fishrock123 Fishrock123 added the enhancement New feature or request label Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant