Skip to content

Stop test-element.R writing Rplots.pdf - #216

Merged
joethorley merged 1 commit into
devfrom
fix-rplots-pdf
Oct 23, 2026
Merged

joethorley merged 1 commit into
devfrom
fix-rplots-pdf

Conversation

@joethorley

Copy link
Copy Markdown
Member

ggplot2::element_grob() measures text, which opens R's default non-interactive device (pdf("Rplots.pdf")) in tests/testthat/ when no device is open. The test now opens a temporary PDF device with withr::local_pdf(withr::local_tempfile()).

Verified locally: devtools::test(filter = "^element$") passes and no Rplots.pdf is created.

🤖 Generated with Claude Code

…tten

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@joethorley
joethorley merged commit e801779 into dev Oct 23, 2026
8 of 9 checks passed
@joethorley
joethorley deleted the fix-rplots-pdf branch October 23, 2026 11:58
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.

1 participant