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

use testthat's dev version and mock_output_sequence() #211

Open
maelle opened this issue Feb 28, 2025 · 3 comments
Open

use testthat's dev version and mock_output_sequence() #211

maelle opened this issue Feb 28, 2025 · 3 comments
Assignees

Comments

@maelle
Copy link
Member

maelle commented Feb 28, 2025

r-lib/testthat#2061 was merged so you could (but don't have to)

  • you can install pak::pak("r-lib/testthat")
  • register the dependency in DESCRIPTION use_dev_package("testthat") -- it'd have to be removed before submission to CRAN if you intend to do that, so it'd have to be submitted after testthat's next release
  • replace your own helper with
  local_mocked_bindings(
    readline = mock_output_sequence("3", "This is a note", "n")
  )
  • delete helper_mock.R
Copy link

welcome bot commented Feb 28, 2025

🎉 Thank you for opening your first issue in this repo! Please check our contribution guidelines and follow the issue template.

@RayStick
Copy link
Contributor

RayStick commented Mar 5, 2025

Thanks @maelle! Sorry I seemed to have missed this.

Do you think it makes sense to do this now, or wait for testthat next release?

@maelle
Copy link
Member Author

maelle commented Mar 6, 2025

It depends on whether you're planning a CRAN release of mapmetadata yourself. If you're not, it's no big deal to use testthat dev version (at least I think so? you might discover a new bug I guess as with any version of anything 😸 ). So you could do it whenever you have time.

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

No branches or pull requests

2 participants