Mercurial > hg > buttercup
annotate tests/test_checkout.txt @ 32:86c3c0d4d434
drastic rewrite; now use classes == flowers
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 12 Jun 2011 18:22:50 -0700 |
parents | e0cc2fae92bd |
children |
rev | line source |
---|---|
27 | 1 Test Checkout |
2 ============= | |
3 | |
4 | |
5 Boilerplate:: | |
6 | |
7 >>> from buttercup import source | |
8 | |
9 Stub call method to test what is to be done:: | |
10 | |
29
e0cc2fae92bd
much more successfully test call method
Jeff Hammel <jhammel@mozilla.com>
parents:
27
diff
changeset
|
11 >>> def call_stub(*x, **kwargs): |
e0cc2fae92bd
much more successfully test call method
Jeff Hammel <jhammel@mozilla.com>
parents:
27
diff
changeset
|
12 ... print ' '.join(x[0]) |
e0cc2fae92bd
much more successfully test call method
Jeff Hammel <jhammel@mozilla.com>
parents:
27
diff
changeset
|
13 >>> source.call = call_stub |
27 | 14 |
29
e0cc2fae92bd
much more successfully test call method
Jeff Hammel <jhammel@mozilla.com>
parents:
27
diff
changeset
|
15 Test (stubbed) __call__ method:: |
27 | 16 |
17 >>> pyloader = 'http://k0s.org/hg/pyloader' | |
29
e0cc2fae92bd
much more successfully test call method
Jeff Hammel <jhammel@mozilla.com>
parents:
27
diff
changeset
|
18 >>> hgsource = source.HgSource(pyloader, srcdir='/tmp') |
27 | 19 >>> hgsource() |
29
e0cc2fae92bd
much more successfully test call method
Jeff Hammel <jhammel@mozilla.com>
parents:
27
diff
changeset
|
20 hg clone http://k0s.org/hg/pyloader |