Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

How to efficiently test the huge inherited Dataset API #9

Closed
TomNicholas opened this issue Aug 20, 2021 · 2 comments
Closed

How to efficiently test the huge inherited Dataset API #9

TomNicholas opened this issue Aug 20, 2021 · 2 comments
Labels
testing Tests or assert functions for testing

Comments

@TomNicholas
Copy link
Member

xarray.Dataset has a ginormous API, and eventually the entire thing should also be available on DataTree. However we probably still need to test this copied API, because the majority of it will be altered via the @map_over_subtree decorator. How can we do that without also copying thousands of lines of tests from xarray.tests?

@TomNicholas TomNicholas added the testing Tests or assert functions for testing label May 18, 2022
@TomNicholas
Copy link
Member Author

TomNicholas commented May 25, 2022

@jhamman made a good suggestion today: reroute as much as possible internally through a node._to_temp_dataset() private method, similarly to what we do in xarray.DataArray.

This would mean that every method which is intended to act the same as it does on Dataset will essentially be guaranteed to act the same, because internally it calls the corresponding Dataset method. This could make the number of tests required for #41 much lower.

@TomNicholas
Copy link
Member Author

Closed in favour of pydata/xarray#9347

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing Tests or assert functions for testing
Projects
None yet
Development

No branches or pull requests

1 participant