Skip to content

Commit c61a9e5

Browse files
authored
docs(test2): Use ignore attribute (#142)
2 parents a6b2afa + e8492bb commit c61a9e5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/libtest2/examples/simple.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ fn check_sokka(_context: &TestContext) -> RunResult {
2020
Err(RunError::fail("Sokka tripped and fell :("))
2121
}
2222
#[libtest2::test]
23-
fn long_computation(context: &TestContext) -> RunResult {
24-
context.ignore_for("slow")?;
25-
23+
#[ignore = "slow"]
24+
fn long_computation(_context: &TestContext) -> RunResult {
2625
std::thread::sleep(std::time::Duration::from_secs(1));
2726
Ok(())
2827
}

0 commit comments

Comments
 (0)