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

Refactor test case virtual dataset creation into pytest fixture. #58

Closed

Conversation

norlandrhagen
Copy link
Collaborator

Moved logic from test_combine_by_coords for creating a virtual dataset into a fixture for re-use.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.33%. Comparing base (2c83531) to head (c33fe2f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
+ Coverage   90.29%   90.33%   +0.04%     
==========================================
  Files          14       14              
  Lines         938      942       +4     
==========================================
+ Hits          847      851       +4     
  Misses         91       91              
Flag Coverage Δ
unittests 90.33% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TomNicholas
Copy link
Member

TomNicholas commented Mar 27, 2024

I'm not sure this change makes sense... I can see why it might be nice to factor out the creation of the virtual datasets into a fixture, but the xr.combine_by_coords call should definitely still be in the test itself, because if an error is thrown it will likely be from inside that function.

EDIT: Also the xr.combine_by_coords would be present in user code, and we should test what the user would write.

@norlandrhagen
Copy link
Collaborator Author

Makes sense! Getting a bit too carried away in fixture land 😅

@TomNicholas TomNicholas deleted the fixture/concated_virtual_dataset_with_indexes branch March 30, 2024 14:42
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

Successfully merging this pull request may close these issues.

2 participants