This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Adds Mock Object support to unittest.TestCase
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: loewis, mattruss
Priority: normal Keywords: patch

Created on 2003-03-19 22:55 by mattruss, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unittest.mattruss.diff mattruss, 2003-03-19 23:11
Test_MockFactory.py mattruss, 2003-03-19 23:12 unittests for MockFactory
MockFactory.py mattruss, 2003-03-19 23:13 Implementation of MockObject (as MockFactory)
Messages (2)
msg43055 - (view) Author: Matthew Russell (mattruss) Date: 2003-03-19 22:55
Mock objects can greatly improve unittests (If used in 
the correct context), especially for code that relis upon 
resource hungry test (connections to databases, socket 
servers etc).

The module/patch (to unittest) which I am submitting 
helps to introspect calls to code whilst maintaing 
transparency and funcionality with your code.

I had previously written a similar module for my present 
employers, and myself and fellow XP partners agree 
that it has made the XP testing cycle consderably 
easier.  Having googol-ed-out alternatives on the web, I 
have not found a solution that provides the same level of 
flexibility. (hope that doesn't sound arrogant)

The tests for this module should highlight usage, but i 
will supply dummy code if this idea is accepted.

If unfamiliar with XP/MockObject ideas, please see :
http://www.xprogramming.com/xpmag/virtualMockObject
s.htm#N78

msg43056 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-03-30 17:41
Logged In: YES 
user_id=21627

This is now in feature request #708125.
History
Date User Action Args
2022-04-10 16:07:47adminsetgithub: 38186
2003-03-19 22:55:21mattrusscreate