Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix column values problem message #100

Merged
merged 5 commits into from
Nov 22, 2021
Merged

Conversation

gadenbuie
Copy link
Member

Fixes a bug that caused the "I didn't expect your result" message to overwrite the "I didn't expect your ___ column" messages for values problems.

pkgload::load_all()
#> ℹ Loading tblcheck

.result <- tibble::tibble(x = c(1:5, runif(5)))
.solution <- tibble::tibble(x = c(1:5, runif(5)))

Before

tbl_grade_column("x")
#> <gradethis_graded: [Incorrect]
#>   I didn't expect your result to include the values `0.2423`, `0.1420`,
#>   and `0.0605`.
#> >
tbl_check_column("x")
#> <tblcheck problem>
#> I didn't expect your result to include the values `0.2423`, `0.1420`, and `0.0605`.
#> $ type    : chr "values"
#> $ expected: num [1:10] 1 2 3 4 5 ...
#> $ actual  : num [1:10] 1 2 3 4 5 ...
#> $ location: chr "column"
#> $ column  : chr "x"

After

tbl_grade_column("x")
#> <gradethis_graded: [Incorrect]
#>   I didn't expect your `x` column to include the values `0.2423`,
#>   `0.1420`, and `0.0605`.
#> >
tbl_check_column("x")
#> <tblcheck problem>
#> I didn't expect your `x` column to include the values `0.2423`, `0.1420`, and `0.0605`.
#> $ type    : chr "values"
#> $ expected: num [1:10] 1 2 3 4 5 ...
#> $ actual  : num [1:10] 1 2 3 4 5 ...
#> $ location: chr "column"
#> $ column  : chr "x"

@gadenbuie gadenbuie added the bug Something isn't working label Nov 22, 2021
@gadenbuie gadenbuie merged commit 13299a8 into main Nov 22, 2021
@gadenbuie gadenbuie deleted the fix-column-values-problem-message branch November 22, 2021 20:33
@rossellhayes
Copy link
Contributor

Good fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants