Mercurial > hg > buttercup
annotate tests/test_checkout.txt @ 53:af4155b0a260 default tip
add --prefix option
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Tue, 03 Nov 2020 07:59:36 -0800 |
| 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 |
