silx
silx copied to clipboard
[ExternalResources] Allow to set `_data_home`
When using ExternalResources in a pytest test, I want the downloaded data to be put in the tmpdir provided by the pytest fixture.
But so far, there is no way of setting data_home, be it in the constructor of ExternalResources or via a setter, forcing me to do:
silx_resources = ExternalResources(
PROJECT_NAME, url_base="http://www.silx.org/pub"
)
silx_resources._data_home = tmpdir
I think adding a way of setting data_home via the constructor is quite sensible. I can do a PR if you agree.