<div dir="ltr">Under Python 2.7.3 and Mock 1.0.0, we&#39;ve noticed some strange behavior.    On Linux, 0 &lt; MagicMock(), and on Windows 0 &gt; 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 &quot;MagicMock() &gt; 0&quot; is ultimately evaluated as &quot;0 &lt; MagicMock().&quot;  See Lennert Regebro&#39;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>