Attribute Macro pal_async::async_test
#[async_test]
Expand description
Attribute macro on async tests.
This attribute macro acts just like the #[test]
attribute except that it
works on async
functions. It works by running the test using the
pal_async::DefaultPool
executor.
Your async function can optionally take an argument to receive the pool
driver/spawner, of type pal_async::DefaultDriver
.
This macro combines well with test_with_tracing::test
. If that macro is in
scope via use
, then it will be used instead of Rust’s default #[test]
attribute.