Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit_testing: test file names #583

Open
jpolton opened this issue Oct 19, 2022 · 0 comments
Open

unit_testing: test file names #583

jpolton opened this issue Oct 19, 2022 · 0 comments

Comments

@jpolton
Copy link
Collaborator

jpolton commented Oct 19, 2022

test files used in unit_testing should include parent class in name.

This started with test_index_class_load_datasets.py which grouped all the reading methods for index objects.
However it makes more sense to group the test files by child object, complete with their methods, rather than a horizontal slice across each child object pulling out e.g. all the equivalent read methods.

Nevertheless there is also some elegance in having all the indexed class load methods together. This helps identify / group all the class objects that are children of indexed.

So, propose better filenaming to help clarify which is the parent object.

E.g.
test_isobath_contour_methods.py --> test_gridded_isobath_contour_methods.py
test_altimetry_methods.py --> test_indexed_altimetry_methods.py

Also test_index_class_load_datasets.py isn't actually tested but is a useful place to keep stub development for indexed children objects. This should be purge to retain only the undeveloped/untested methods (see also notes in file header):

  • EGO Gliders
  • ARGO floats
  • OceanParcels data
    and perhaps the file named to WIP_test_index_class_load_datasets.py
@jpolton jpolton changed the title test files should include parent class in name There is also some elegance in having all the indexed class load methods together. As opposed to having one file per object, with all its methods too. Better filenaming could help point out the parent object. Tidy test_index_class_load_datasets.py to only test untested datasets (see header) unit_testing: test file names Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: BODC - Todo
Development

No branches or pull requests

1 participant