Mercurial > hg > buttercup
comparison tests/test_checkout.txt @ 29:e0cc2fae92bd
much more successfully test call method
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 30 May 2011 21:26:50 -0700 |
parents | 901755a65249 |
children |
comparison
equal
deleted
inserted
replaced
28:51b62e96ab51 | 29:e0cc2fae92bd |
---|---|
6 | 6 |
7 >>> from buttercup import source | 7 >>> from buttercup import source |
8 | 8 |
9 Stub call method to test what is to be done:: | 9 Stub call method to test what is to be done:: |
10 | 10 |
11 >>> source.call = lambda *x, **kw: ' '.join(x[0]) | 11 >>> def call_stub(*x, **kwargs): |
12 ... print ' '.join(x[0]) | |
13 >>> source.call = call_stub | |
12 | 14 |
13 Test __call__ method:: | 15 Test (stubbed) __call__ method:: |
14 | 16 |
15 >>> pyloader = 'http://k0s.org/hg/pyloader' | 17 >>> pyloader = 'http://k0s.org/hg/pyloader' |
16 >>> hgsource = source.HgSource(pyloader) | 18 >>> hgsource = source.HgSource(pyloader, srcdir='/tmp') |
17 >>> hgsource() | 19 >>> hgsource() |
20 hg clone http://k0s.org/hg/pyloader |