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

Calling as_tibble() as the tests seem to require it #11

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

romainfrancois
Copy link
Contributor

From this test:

test_that('ast2df', {
  expect_identical(
    ast2df(list(blocks = tree)),
    tibble::tibble(
      txt = c('text', 'text'),
      Str = c(TRUE, TRUE),
      Emph = c(TRUE, TRUE),
      Para = c(TRUE, TRUE)
    )
  )
})

it looks like the result of astdf should be a tibble, so this pr adds a call to as_tibble() to enforce it. The next version of dplyr which we plan to release this week makes a data.frame in that case.

Alternatively, the test could be:

test_that('ast2df', {
  expect_equivalent(
    ast2df(list(blocks = tree)),
    tibble::tibble(
      txt = c('text', 'text'),
      Str = c(TRUE, TRUE),
      Emph = c(TRUE, TRUE),
      Para = c(TRUE, TRUE)
    )
  )
})

@atusy atusy merged commit c2f8e27 into atusy:master Jul 15, 2020
@atusy
Copy link
Owner

atusy commented Jul 15, 2020

Thank you!

atusy added a commit that referenced this pull request Jul 15, 2020
@romainfrancois
Copy link
Contributor Author

Thanks for merging it so fast. The change is no longer necessary (tidyverse/dplyr#5416) but it does not hurt, you may keep it in, but if you have not yet release to CRAN there is no rush.

@romainfrancois romainfrancois deleted the as_tibble branch July 17, 2020 10:13
@atusy
Copy link
Owner

atusy commented Jul 19, 2020

Alright! Thanks!

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.

2 participants