# HG changeset patch # User Jeff Hammel # Date 1306815702 25200 # Node ID 901755a652495357fb717fec14ff59d2142e15f4 # Parent 8179c05d7692469c9f578bd9701a6f5e78278b16 start stubbing checkout diff -r 8179c05d7692 -r 901755a65249 buttercup/source.py --- 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""" diff -r 8179c05d7692 -r 901755a65249 tests/doctest.txt --- 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'] + diff -r 8179c05d7692 -r 901755a65249 tests/test_checkout.txt --- /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()