dark-peak-analytics / assertHE

R package to assist in the verification of health economic decision models.
https://dark-peak-analytics.github.io/assertHE/
Other
4 stars 10 forks source link

Unit tests fail for check_functions due to issues with relative paths #6

Closed RobertASmith closed 9 months ago

RobertASmith commented 9 months ago

The unit tests currently fail for check_functions. These unit tests are located here:

https://github.com/dark-peak-analytics/assertHE/pull/5/files#diff-d473b2c34b1d993bd81a457aa595bc38135e3c559c5ab81f6eac9709721d7a21

I think this is due to the paths from within the test-that environment.

For example, running a test in RStudio manually results in a pass.

df_tests2 <<- assertHE:::tabulate_functions_in_folder_with_tests(
       path = getwd(),     #=== HERE ===#
       path_exclude = "tests/testthat",
       packages_to_exclude = NULL,
       test_path = "tests/testthat"
     )

But running :

devtools::test()

Results in four fails.

Not sure on next steps, need to investigate why this is the case.

This doesn't block further development.