Skip to content

start work on delete_cassettes()#553

Open
maelle wants to merge 9 commits into
mainfrom
delete
Open

start work on delete_cassettes()#553
maelle wants to merge 9 commits into
mainfrom
delete

Conversation

@maelle
Copy link
Copy Markdown
Member

@maelle maelle commented Nov 14, 2025

Fix #552

Not ready, will need a second pass

@sckott
Copy link
Copy Markdown
Collaborator

sckott commented Nov 15, 2025

@maelle nice! should i look for the current state of this branch or do you want to do more first?

@maelle
Copy link
Copy Markdown
Member Author

maelle commented Nov 20, 2025

I will do more first!

Comment thread tests/testthat/_snaps/delete_cassettes.md Outdated
@maelle maelle marked this pull request as ready for review November 20, 2025 10:14
@maelle
Copy link
Copy Markdown
Member Author

maelle commented Nov 20, 2025

@sckott this PR was sort of an experiment, I worked with Claude CLI! I think it's ready for review. 😸

@maelle
Copy link
Copy Markdown
Member Author

maelle commented Nov 20, 2025

A bit confused by the test error that is unrelated to my changes?!

 ══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-lightswitch.R:16:5'): turned_off works if and only if no cassettes active ──
Adding new snapshot:
Code
  turned_off(5 + 5)
Condition
  Error in `turn_off()`:
  ! You must eject all cassettes before you can turn vcr off.
Backtrace:1. └─base::eval(...)
 2.   └─base::eval(...)
 3.     └─testthat::expect_snapshot(turned_off(5 + 5), error = TRUE) at test-lightswitch.R:16:5

[ FAIL 1 | WARN 0 | SKIP 1 | PASS 598 ]
Error:
! Test failures.
Execution halted

@maelle
Copy link
Copy Markdown
Member Author

maelle commented Nov 20, 2025

Same failure in #554 that has no real edit, maybe due to the new testthat version?

@maelle
Copy link
Copy Markdown
Member Author

maelle commented Nov 20, 2025

Ah yes

Additionally, expect_snapshot() and friends will now fail when creating a new snapshot on CI, as that’s usually a signal that you’ve forgotten to run the snapshot code locally before committing.

I'll make a commit to main!

@sckott
Copy link
Copy Markdown
Collaborator

sckott commented Nov 21, 2025

great i'll take a look soon!

@sckott sckott self-requested a review December 2, 2025 14:28
Copy link
Copy Markdown
Collaborator

@sckott sckott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. I'm still poking around.

Shouldn't there be a man/delete_cassettes.Rd file? Can you add that please

@maelle
Copy link
Copy Markdown
Member Author

maelle commented Jan 13, 2026

@sckott done, sorry about the delay 😸

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.

Helper to delete cassettes

2 participants