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

How to use snapshot on Github (snapshot differs local from github) #1915

Closed
latot opened this issue Dec 4, 2023 · 2 comments
Closed

How to use snapshot on Github (snapshot differs local from github) #1915

latot opened this issue Dec 4, 2023 · 2 comments

Comments

@latot
Copy link

latot commented Dec 4, 2023

Hi all, I started using snapshot to take errors on a package, the use is pretty simple, of the library and how snapshot works, I followed docs to implement it, I have also implemented it in other places.

So, the main point in this issue is how to use snapshots with github, for some reason, actually we can run snapshots locally and all will works just fine, until we try to run the same snapshots on github and for some reason, some package or R it self change the behavior of print things and the tests fails.

So the question would be, how can we get sure to normalize the output of packages or waldo to be able to run the tests locally and on github.

Here is a sample: CIT-UAI/geotypes#20

You can see there how and why fails, and is because something on printing changed on CI, while locally all is fine.

Maybe, instead update docs, would be possible to when is done library(testthat) execute some statements to be sure the output format is common.

I think would be useful have some docs about this.

Thx!

@Johan-rosa
Copy link

Same issue here. On github the snapshot has a line brake in a different place. Example:

Locally

paste(
  "Hello,", "how",
  "are", "your"
)

Github

paste(
  "Hello,", 
  "how", "are", "your"
)

@hadley
Copy link
Member

hadley commented Oct 22, 2024

Unfortunately there's no general answer to this question — you need to figure out why the code is giving different answers on github and then fix it 😞

@hadley hadley closed this as completed Oct 22, 2024
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

3 participants