Skip to content

Conversation

@hadley
Copy link
Member

@hadley hadley commented Nov 5, 2024

And create more helpers for testing various more complicated success and failure modes.

Fixes #1994

@DavisVaughan no need to go deep here on the actual implementation/fix, but I'd appreciate your eyes on the newly exported expectation test helpers.

And create more helpers for testing various more complicated success and failure modes.

Fixes #1994
@hadley hadley requested a review from DavisVaughan November 5, 2024 15:02
Copy link
Member

@DavisVaughan DavisVaughan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know when I'd ever use these in my own packages, but I am on board with the symmetry since you already have expect_success() and expect_failure()

Comment on lines +83 to +84
expect_no_failure <- function(expr) {
exp <- capture_failure(expr)
Copy link
Member

@DavisVaughan DavisVaughan Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a test? (i see you do have one for expect_no_success(), and existing ones for expect_snapshot_failure())

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like expect_failure(expect_no_failure(expect_true(FALSE)))? 😆

@hadley hadley merged commit 6ba4397 into main Nov 6, 2024
11 checks passed
@hadley hadley deleted the bad-traceback branch November 6, 2024 15:42
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

Successfully merging this pull request may close these issues.

rlang error with `... %>% expect_warning()

3 participants