Skip to content

test: add test for write_xpt invisibly returning original data unaltered#819

Closed
LeonidasZhak wants to merge 1 commit into
tidyverse:mainfrom
LeonidasZhak:test/write-xpt-invisible-return
Closed

test: add test for write_xpt invisibly returning original data unaltered#819
LeonidasZhak wants to merge 1 commit into
tidyverse:mainfrom
LeonidasZhak:test/write-xpt-invisible-return

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Summary

Adds a test verifying that write_xpt() returns the original data frame invisibly and unaltered, matching the pattern used by write_dta() and write_sav() in their respective test files.

Changes

  • tests/testthat/test-haven-sas.R: Added "invisibly returns original data unaltered" test for write_xpt()

Motivation

Both test-haven-stata.R and test-haven-spss.R have tests verifying that their respective write functions (write_dta() and write_sav()) return the input data invisibly and unaltered. This test was missing for write_xpt() in test-haven-sas.R.

The test verifies an important behavior: that write_xpt() doesn't modify the input data frame (e.g., doesn't strip attributes or change values) and returns it invisibly.

Testing

devtools::test(filter = "haven-sas")
# [ FAIL 1 | WARN 1 | SKIP 0 | PASS 71 ]

The single failure is a pre-existing issue with the cols_only deprecation test (line 132) unrelated to this change.

Relation to existing PRs

Adds a test verifying that write_xpt() returns the original data frame
invisibly and unaltered, matching the pattern used by write_dta() and
write_sav() in their respective test files.

This brings write_xpt test coverage in line with the other write
functions.
@LeonidasZhak

Copy link
Copy Markdown
Author

Withdrawing this small automated PR while I consolidate an oversized batch of contributions and reduce maintainer review burden. Sorry for the noise, and thank you for maintaining the project.

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