Code Archive Skip to content Google About Google Privacy Terms
pMock has not been under active development since mid 2004. For other suitable mocking frameworks see the Cheescake info on python mock testing tools pMock is a Python module for testing Python code using mock objects. ... import pmock ... class InstrumentTest(unittest.TestCase): def test_low_quality_analysis(self): analyser_mock = pmock.Mock() analyser_mock.expects().analyse(pmock.eq("123")).will
# (c) 2006 Ian Bicking, Mike Beachy, and contributors # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php r""" minimock is a simple library for doing Mock objects with doctest. When using doctest, mock objects can be very simple. Here's an example of something we might test, a simple email sender:: >>> import smtplib >>> def send_email(from_addr, to_addr, subject,
Introduction A problem that frequently occurs when writing unit tests is how to test a unit in isolation from other classes. One solution to this problem is to create Mock Objects that mimic interface of the classes that the unit depends on. The Mock Object can then return canned values in response to method calls, or check that the expected methods are called with the correct arguments. Mock Obje
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く