Skip to content

Commit c205c2c

Browse files
Refactor non-idiomatic assertions in test_coord_equality (#6862)
* Refactor non-idiomatic assertions in test_coord_equality * Clarify usage of explicit comparison operators in test_coord_equality * Clarify usage of explicit comparison operators in test_coord_equality * Remove trailing space --------- Co-authored-by: Martin Yeo <[email protected]>
1 parent ae9f446 commit c205c2c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/iris/tests/test_cell.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def test_in(self):
9696
assert c not in [3, c2]
9797

9898
def test_coord_equality(self):
99+
# NOTE: These comparisons intentionally use explicit operators to ensure each
100+
# rich comparison method (__eq__, __ne__, __lt__, __le__, __gt__, __ge__) is
101+
# exercised.
99102
self.d = iris.coords.Cell(1.9, None)
100103
assert self.d == 1.9
101104
assert not self.d == [1.5, 1.9]

0 commit comments

Comments
 (0)