From 52476d69f2c7f7b134bb3b5c4fdbb58cdf9b1efc Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 3 Aug 2011 20:10:40 +0200 Subject: Assertions: use expected value on left side of comparisons. This way, we can easily adjust __eq__() & __ne__() there. --- pmstestsuite/library/case.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pmstestsuite/library') diff --git a/pmstestsuite/library/case.py b/pmstestsuite/library/case.py index 80b4e4b..9ff757a 100644 --- a/pmstestsuite/library/case.py +++ b/pmstestsuite/library/case.py @@ -91,7 +91,7 @@ class BoolAssertionResult(AssertionResult): return self._cond def __bool__(self): - return self._cond == self._expect + return self._expect == self._cond class ContainsAssertionResult(AssertionResult): def __init__(self, name, needle, container): @@ -128,11 +128,11 @@ class EqualAssertionResult(AssertionResult): return repr(self._value) def __bool__(self): - return self._value == self._expect + return self._expect == self._value class NotEqualAssertionResult(EqualAssertionResult): def __bool__(self): - return self._value != self._expect + return self._expect != self._value @property def expected(self): -- cgit v1.2.3-65-gdbad