Error in ods_error_message(warn, dataset) :
An unknown error has occurred. The original error message was: Error message: simpleWarning in rep(as.integer(len), length = length(str)): partial argument match of 'length' to 'length.out'.
the code will work with no errors. I reckon we could temporarily modify those options to pass the tests; however, likely warnings shouldn't translate to errors and break the code, plus I'm not sure what's the best practice for modifying options for the purpose of package testing.
ods_dataset(dataset = "average-household-size", geography = "la") seems to be working, so I'll be mark this as closed for now. I'm working on the testthat tests at the moment to get a good set.
So this line:
returns the following error:
I reckon this used to work as it's used in tests: https://github.com/DataScienceScotland/opendatascot/blob/d33f065d3ad730648f12947ee26a9864eba9c3c2/tests/testthat/test_ods_dataset.R#L3-L6
Solution :)
The problem is with handling warnings, with those options
the code will work with no errors. I reckon we could temporarily modify those options to pass the tests; however, likely warnings shouldn't translate to errors and break the code, plus I'm not sure what's the best practice for modifying options for the purpose of package testing.