MetOffice / MetOffice/tempest_helper
Add unittest for save_trajectories_netcdf()
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure of the best way of doing this. A pure unittest would use mock and would check that function calls have been made in the right order but I don't see a huge amount of value in that. An integration style test that compares the file produced against some sort of reference may be more appropriate. This may require an external dependency such as ncdump, nccmp or xarray (https://stackoverflow.com/a/50822509), but only for developers and not for users (PyPI allows dependencies to be separated like this).
Contributor guide
Research direction
Start by locating save_trajectories_netcdf() and reading how it produces NetCDF output. Decide whether a mock-based unit test or an integration-style comparison best verifies the behavior, then add the test and any developer-only dependency needed. Done means the test reliably detects incorrect output or call behavior without adding a user dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100