Skip to content

Commit 0c07aa6

Browse files
committed
renew test_methodcaller
1 parent f5dfd29 commit 0c07aa6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test_methodcaller.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ def __repr__(self):
1212
return 'Point({!r:},{!r:},{!r:},{!r:})'.format(self.a, self.b, self.c, self.d)
1313
def __lt__(self, other):
1414
return (self.a < other.a if self.a != other.a else (self.b < other.b if self.b != other.b else (self.c < other.c if self.c != other.c else self.d < other.d)))
15+
def __le__(self, other):
16+
return self.a <= other.a and self.b <= other.b and self.c <= other.c and self.d <= other.d
1517
def __gt__(self, other):
1618
return (self.a > other.a if self.a != other.a else (self.b > other.b if self.b != other.b else (self.c > other.c if self.c != other.c else self.d > other.d)))
19+
def __ge__(self, other):
20+
return self.a >= other.a and self.b >= other.b and self.c >= other.c and self.d >= other.d
21+
def __eq__(self, other):
22+
return self.a == other.a and self.b == other.b and self.c == other.c and self.d == other.d
1723
def distance(self, a, b, c, d):
1824
return math.hypot(self.a - a, self.b - b, self.c - c, self.d - d)
1925

0 commit comments

Comments
 (0)