<div dir="ltr">Under Python 2.7.3 and Mock 1.0.0, we've noticed some strange behavior. On Linux, 0 < MagicMock(), and on Windows 0 > MagicMock(). Has anyone else noticed similar behavior? Should this be considered a bug?<div>
<br></div><div>Note that MagicMock does not implement the inequality comparison operators, which means that in inequality comparisons it delegates the comparison to the other object. Thus, the expression "MagicMock() > 0" is ultimately evaluated as "0 < MagicMock()." See Lennert Regebro's cogent <a href="http://regebro.wordpress.com/2010/12/13/python-implementing-rich-comparison-the-correct-way/">post about total ordering</a>.</div>
</div>