Skip to content

Closes #3052 - Tests: Move data/objects within testthat calls for "tests/testthat/test-derive_vars_dtm_to_tm.R"#3052

Merged
bms63 merged 2 commits intomainfrom
copilot/move-test-data-inside-calls
Apr 15, 2026
Merged

Closes #3052 - Tests: Move data/objects within testthat calls for "tests/testthat/test-derive_vars_dtm_to_tm.R"#3052
bms63 merged 2 commits intomainfrom
copilot/move-test-data-inside-calls

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Test data in tests/testthat/test-derive_vars_dtm_to_tm.R was defined at the top-level scope, risking unintended side effects between tests. All data objects are now self-contained within their respective test_that blocks.

Changes

  • Moved input tibble inside both Test 1 and Test 2 test_that blocks
  • Moved expected_output inside Test 1; moved former expected_output2 (renamed expected_output) inside Test 2
  • Retained # nolint start/end guards around long-line tribble definitions within each block

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the main branch until you have checked off each task.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance? N/A
  • Review the Cheat Sheet. Make any required updates to it by editing the file inst/cheatsheet/admiral_cheatsheet.pptx and re-upload a PDF and a PNG version of it to the same folder. (The PNG version can be created by taking a screenshot of the PDF version.) N/A
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family. N/A
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately. N/A
  • Address any updates needed for vignettes and/or templates. N/A
  • Update NEWS.md under the header # admiral (development version) if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers). A Developer Notes section is available in NEWS.md for tracking developer-facing issues. N/A
  • Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page. N/A
  • Address or fix all lintr warnings and errors - lintr::lint_package(). N/A
  • Run R CMD check locally and address all errors and warnings - devtools::check(). N/A
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately. N/A
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

Copilot AI changed the title [WIP] Move data within testthat calls for tests/testthat/test-derive_vars_dtm_to_tm.R Closes #3052 - Tests: Move data/objects within testthat calls for "tests/testthat/test-derive_vars_dtm_to_tm.R" Apr 14, 2026
Copilot AI requested a review from bms63 April 14, 2026 19:31
@bms63 bms63 marked this pull request as ready for review April 14, 2026 20:05
@bms63 bms63 requested a review from adcascone April 14, 2026 20:05
@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
admiral 100%
Summary 100% (6123 / 6129)

@bms63
Copy link
Copy Markdown
Collaborator

bms63 commented Apr 15, 2026

This is a pretty simple one so just going to merge in as AI created it and I reviewed it

@bms63 bms63 merged commit 5f2258f into main Apr 15, 2026
16 of 17 checks passed
@bms63 bms63 deleted the copilot/move-test-data-inside-calls branch April 15, 2026 18:11
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.

Tests: Move data/objects within testthat calls for "tests/testthat/test-derive_vars_dtm_to_tm.R"

2 participants