Commits

Marc Abramowitz committed 9cef9c3 Merge

Merge fix_test_failures_2013-03-12 branch

Comments (0)

Files changed (2)

 Now we want to make a mock ``smtplib.SMTP`` object.  We'll have to
 inject our mock into the ``smtplib`` module::
 
+    >>> from minimock import Mock
     >>> smtplib.SMTP = Mock('smtplib.SMTP')
     >>> smtplib.SMTP.mock_returns = Mock('smtp_connection')
 
         ...     (locals(),))
         >>> obj_name, attrs
         ('os', ['path', 'isdir'])
-        >>> getattr(getattr(nsdict[obj_name], attrs[0]), attrs[1])
+        >>> getattr(getattr(nsdict[obj_name], attrs[0]), attrs[1])  # doctest: +ELLIPSIS
         <function isdir at ...>
         >>> lookup_by_name("os.monkey", (locals(),))
         Traceback (most recent call last):
     An example of how os.path.isfile is replaced::
 
         >>> import os
-        >>> os.path.isfile
+        >>> os.path.isfile  # doctest: +ELLIPSIS
         <function isfile at ...>
         >>> isfile_id = id(os.path.isfile)
         >>> mock("os.path.isfile", returns=True)
-        >>> os.path.isfile
+        >>> os.path.isfile  # doctest: +ELLIPSIS
         <Mock ... os.path.isfile>
         >>> os.path.isfile("/foo/bar/baz")
         Called os.path.isfile('/foo/bar/baz')
         >>> mock_id != id(os.path.isfile)
         True
         >>> restore()
-        >>> os.path.isfile
+        >>> os.path.isfile  # doctest: +ELLIPSIS
         <function isfile at ...>
         >>> isfile_id == id(os.path.isfile)
         True
         ...         return getattr(self._obj, name)
         >>> import os
         >>> os = Proxy(os)
-        >>> os.path.isfile
+        >>> os.path.isfile  # doctest: +ELLIPSIS
         <function isfile at ...>
         >>> mock('os.path.isfile')
-        >>> os.path.isfile
+        >>> os.path.isfile  # doctest: +ELLIPSIS
         <Mock ... os.path.isfile>
         >>> restore()
 
             >>> m.some_meth('dummy argument')
             >>> assert_same_trace(tt,
             ...     "Called mock_obj.some_meth('dummy argument')\n")
-            >>> assert_same_trace(tt, "Non-matching trace")
+            >>> assert_same_trace(tt, "Non-matching trace")  # doctest: +ELLIPSIS
             Traceback (most recent call last):
             ...
             AssertionError...