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

Create high-level list of unit tests #2

Open
13 of 24 tasks
agstephens opened this issue Oct 27, 2022 · 1 comment
Open
13 of 24 tasks

Create high-level list of unit tests #2

agstephens opened this issue Oct 27, 2022 · 1 comment
Assignees

Comments

@agstephens
Copy link
Member

agstephens commented Oct 27, 2022

Basic unit tests

These tests confirm things are working:

  • 1. item search returns correct count
  • 2. asset search returns correct count
  • 3. asset search within one item returns correct content (number of assets, supports time filtering etc) - using .get_asset(id), .assets, .get_assets().
  • 4. item search on instance_id returns 1 item, matching instance_id (e.g.: CMIP6.HighResMIP.MOHC.HadGEM3-GC31-HH.highres-future.r1i1p1f1.day.tas.gn.v20191105)
  • 5. assert that there are no duplicate asset records in an item (using instance_id above)
  • 6. item search on various facets matches those facets in the results
  • 7. Unit test: temporal search returns correct content #8

Comprehensive unit tests

These tests explore the breadth of options in the search client:

@agstephens
Copy link
Member Author

@rhysrevans3 you might want to use pytest.mark.parametrize like here:

https://github.com/cedadev/midas-extract/blob/master/tests/test_midas_extract.py#L98-L106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants