Skip to contents

Initialize the settings object for project tests using a config file. Use to set up test environment and data roots for validation.

Usage

get_test_settings(settings_file)

Arguments

settings_file

character(1). Config name or full path. Relative paths use WEIGHTING_CODE_PATH/configs.

Value

list. Initialized settings object for project test.

Details

  • Parses settings file and sets up project-specific data root.

  • Supports relative or absolute config paths; uses WEIGHTING_CODE_PATH if relative.

  • Returns initialized settings object for tests.

  • Assumes valid config and environment; errors if missing.

Settings

None.

See also

  • get_settings, parse_settings_path

  • scripts/tests/test_settings.R

Other test utilities: test_results(), test_teardown()

Examples

## Not run:
get_test_settings("test_config.yaml")
#> Error in parse_settings_path(settings_file): No settings file found at: /home/runner/work/hts_weighting-psrc_2025/hts_weighting-psrc_2025/configs/test_config.yaml. Is the extension correct?  ('yml' or 'yaml')
## End(Not run)