Skip to content

expect_setequal doesn't work on lists (document?) #750

Description

@MichaelChirico

I'd expect the following test to pass: expect_setequal(list(a = 1:4, b = 4:1), list(b = 4:1, a = 1:4)), but it fails because the inputs are sorted with sort.int, which doesn't know how to handle a list.

I was attempting to replace a test of the form expect_equal(my_list[order(names(my_list))], list(a = 1:4, b = 4:1)).

If there's disagreement about whether these objects should be considered setequal, at the very least we need to document the acceptable types (atomic?) to be passed to object as ?expect_setequal only says:

object object to test

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorexpectation 🙀

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions