Skip to content

test() failure not helpful for reporting exact match subset #7834

Description

@MichaelChirico
test(1, c(1:10, 11:1000), c(1:10, 1000:11))
# Test 1 ran without errors but failed check that x equals y:
# > x = c(1:10, 11:1000) 
# First 6 of 1000 (type 'integer'): 
# [1] 1 2 3 4 5 6
# > y = c(1:10, 1000:11) 
# First 6 of 1000 (type 'integer'): 
# [1] 1 2 3 4 5 6
# Mean relative difference: 0.9792285

We don't get any indication of how x and y actually differ because the glimpse only shows us the first 6 entries no matter what.

For double/complex, the way to proceed is tough, because "how different is different" is very tough in general.

Still, I think we can do better than completely ignoring the issue.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions