diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-08-03 20:10:40 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-08-03 20:10:40 +0200 |
commit | 52476d69f2c7f7b134bb3b5c4fdbb58cdf9b1efc (patch) | |
tree | 2395a681da52468a8e4338ac4d16e3b2ce5b32fb /pmstestsuite/library/case.py | |
parent | Stringify DepMatcher nicely. (diff) | |
download | pms-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.py | 6 |
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): |