Mercurial > hg > buttercup
changeset 27:901755a65249
start stubbing checkout
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 30 May 2011 21:21:42 -0700 |
parents | 8179c05d7692 |
children | 51b62e96ab51 |
files | buttercup/source.py tests/doctest.txt tests/test_checkout.txt |
diffstat | 3 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/buttercup/source.py Mon May 30 21:13:02 2011 -0700 +++ b/buttercup/source.py Mon May 30 21:21:42 2011 -0700 @@ -20,6 +20,7 @@ def update(self): raise NotImplementedError("`Source` is an abstract base class") + class HgSource(Source): """mercurial source"""
--- a/tests/doctest.txt Mon May 30 21:13:02 2011 -0700 +++ b/tests/doctest.txt Mon May 30 21:21:42 2011 -0700 @@ -24,3 +24,4 @@ >>> sources = source.sources(source_dict, srcdir='/tmp') >>> sorted([i.directory() for i in sources]) ['/tmp/pyloader', '/tmp/toolbox'] +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test_checkout.txt Mon May 30 21:21:42 2011 -0700 @@ -0,0 +1,17 @@ +Test Checkout +============= + + +Boilerplate:: + + >>> from buttercup import source + +Stub call method to test what is to be done:: + + >>> source.call = lambda *x, **kw: ' '.join(x[0]) + +Test __call__ method:: + + >>> pyloader = 'http://k0s.org/hg/pyloader' + >>> hgsource = source.HgSource(pyloader) + >>> hgsource()