Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] consolidate testing constants in helpers file #5992

Merged
merged 3 commits into from Jul 21, 2023

Conversation

jameslamb
Copy link
Collaborator

Working on #5988, I learned about the helpers.R mechanism in {testthat}.

That file is sourced before each test file is run (sort of like a conftest.py with pytest in Python). This PR proposes consolidating some constants that are duplicated across all the tests files into that file, to reduce duplication and encourage consistency across the tests.

For details on how {testthat} treats that file specially, see https://r-pkgs.org/testing-design.html#testthat-helper-files.

file that is always executed by load_all() and at the beginning of automated testing is a helper file, defined as any file below tests/testthat/ that begins with helper.

@jameslamb jameslamb merged commit 44928d3 into master Jul 21, 2023
41 checks passed
@jameslamb jameslamb deleted the r/test-helpers branch July 21, 2023 15:15
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants