https://pantsbuild.org/ logo
#general
Title
# general
q

quiet-painter-18838

04/07/2023, 4:32 AM
Hi community, Thanks for helping us all the time! I need a help and ask if you have any good idea. Is there any good idea to use syrupy by pants? In our case, we use syrupy that manages expected output of test. To update snapshot, we run
pytest --snapshot-update
. But pants doesn’t update snapshot.
b

broad-processor-92400

04/07/2023, 8:36 AM
Yeah, we use syrupy too. How we do it is pretty ugly: force syrupy to write snapshots to a temporary directory that’s outside the repo and outside pants’ sandbox, and then copy the snapshots back into the repo. You can see more details about what we do in https://github.com/pantsbuild/pants/issues/11622#issuecomment-1308009408
q

quiet-painter-18838

04/07/2023, 11:48 AM
Wow, it was you who posted that workaround? I’ve checked it already, and just started considering whether to follow. Thanks a lot.
👍 1
3 Views