# HG changeset patch # User Jeff Hammel # Date 1306815800 25200 # Node ID 51b62e96ab5151027cc808cd2c03cdc7b73d7bf0 # Parent 901755a652495357fb717fec14ff59d2142e15f4 name doctest files more sensibly diff -r 901755a65249 -r 51b62e96ab51 tests/doctest.txt --- a/tests/doctest.txt Mon May 30 21:21:42 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -Test Buttercup -============== - -The obligatory imports:: - - >>> import os - >>> from buttercup import source - >>> cwd = os.getcwd() - -Test source resolution:: - - >>> pyloader = 'http://k0s.org/hg/pyloader' - >>> hgsource = source.HgSource(pyloader) - >>> hgsource.directory() == os.path.join(cwd, 'pyloader') - True - >>> toolbox = 'git://github.com/mozilla/toolbox.git' - >>> gitsource = source.GitSource(toolbox) - >>> gitsource.directory() == os.path.join(cwd, 'toolbox') - True - -Test source resolution with a dictionary:: - - >>> source_dict = {'hg': [pyloader], 'git': [toolbox]} - >>> sources = source.sources(source_dict, srcdir='/tmp') - >>> sorted([i.directory() for i in sources]) - ['/tmp/pyloader', '/tmp/toolbox'] - diff -r 901755a65249 -r 51b62e96ab51 tests/test_source.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test_source.txt Mon May 30 21:23:20 2011 -0700 @@ -0,0 +1,27 @@ +Test Sources +============ + +The obligatory imports:: + + >>> import os + >>> from buttercup import source + >>> cwd = os.getcwd() + +Test source resolution:: + + >>> pyloader = 'http://k0s.org/hg/pyloader' + >>> hgsource = source.HgSource(pyloader) + >>> hgsource.directory() == os.path.join(cwd, 'pyloader') + True + >>> toolbox = 'git://github.com/mozilla/toolbox.git' + >>> gitsource = source.GitSource(toolbox) + >>> gitsource.directory() == os.path.join(cwd, 'toolbox') + True + +Test source resolution with a dictionary:: + + >>> source_dict = {'hg': [pyloader], 'git': [toolbox]} + >>> sources = source.sources(source_dict, srcdir='/tmp') + >>> sorted([i.directory() for i in sources]) + ['/tmp/pyloader', '/tmp/toolbox'] +