Skip to content

expect_success() and expect_failure() potentially misleading under multiple conditionsΒ #2110

@MichaelChirico

Description

@MichaelChirico

As observed in #1469:

expect_success({ expect(TRUE, '1'); expect(FALSE, '2') })
expect_failure({ expect(TRUE, '1'); expect(FALSE, '2') })

Both of these pass, whereas I might expect both to fail.

This is strictly documented correctly:

check that there's at least one success or failure respectively.

But I wonder if that's the natural default behavior, especially with Hadley's comment that producing multiple "success" conditions is usually wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions