aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-08-03 20:10:40 +0200
committerMichał Górny <mgorny@gentoo.org>2011-08-03 20:10:40 +0200
commit52476d69f2c7f7b134bb3b5c4fdbb58cdf9b1efc (patch)
tree2395a681da52468a8e4338ac4d16e3b2ce5b32fb /pmstestsuite/library/case.py
parentStringify DepMatcher nicely. (diff)
downloadpms-test-suite-52476d69f2c7f7b134bb3b5c4fdbb58cdf9b1efc.tar.gz
pms-test-suite-52476d69f2c7f7b134bb3b5c4fdbb58cdf9b1efc.tar.bz2
pms-test-suite-52476d69f2c7f7b134bb3b5c4fdbb58cdf9b1efc.zip
Assertions: use expected value on left side of comparisons.
This way, we can easily adjust __eq__() & __ne__() there.
Diffstat (limited to 'pmstestsuite/library/case.py')
-rw-r--r--pmstestsuite/library/case.py6
1 files changed, 3 insertions, 3 deletions
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):