Skip to content

Conversation

@Hazarean
Copy link
Contributor

🚀 Pull Request

Description

Refactors the test_coord_equality function to replace non-idiomatic assertions (using 'not') with idiomatic equivalents.

No functional behaviour is changed; the change improves readability and maintainability of the test code.

Related to issue #6625.

@CLAassistant
Copy link

CLAassistant commented Dec 17, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for the contribution @Hazarean!

Bad news though: I've just been investigating and it turns out we were wrong to flag this as a bad practice (#6625) in the first place. Tests like this are necessary because the objects being tested implement methods such as:

  • __ne__: !=
  • __gt__: >
  • __le__: <=

... so those operators need to be explicitly tested, even though it ends up looking wrong. I've modified #6625 accordingly. I've learned something today, so thank you for that.

We would welcome another proposal if you're up for it. Plenty left under Good First Issue A good issue to take on if you're just getting started with Iris development !

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, on reflection, would you mind adding a comment to the code explaining that this isn't a mistake? Given this has caught out several of the team 😂

@Hazarean
Copy link
Contributor Author

Actually, on reflection, would you mind adding a comment to the code explaining that this isn't a mistake? Given this has caught out several of the team 😂

Thanks for the quick response and explanation! I'm not able to make the update today but I'll add the explanatory comment as suggested and push an update shortly.

@ESadek-MO
Copy link
Contributor

Hi @Hazarean,

Just to double check, the commit message suggests you intended to add the clarifying comment, but it seems only the reversion of previous changes were pushed!

@Hazarean
Copy link
Contributor Author

Hi @ESadek-MO,

My bad! I'm still getting to grips with the Git workflow. I've just pushed a follow-up commit that includes the note.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (7c2d6a3) to head (763158f).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6862      +/-   ##
==========================================
+ Coverage   90.39%   90.43%   +0.04%     
==========================================
  Files          91       91              
  Lines       24766    24839      +73     
  Branches     4640     4656      +16     
==========================================
+ Hits        22387    22463      +76     
  Misses       1608     1608              
+ Partials      771      768       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Hazarean, congrats on your first PR! And thanks again for highlighting something we were unaware of.

@trexfeathers trexfeathers enabled auto-merge (squash) December 29, 2025 09:23
@trexfeathers trexfeathers merged commit c205c2c into SciTools:main Dec 29, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants