changeset 21:0706968f01bb

stub testing
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 09 Nov 2011 19:59:04 -0800
parents 738d84b4de52
children 63ff1b00ec05
files fetch.py tests/doctest.txt
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/fetch.py	Wed Nov 09 19:55:15 2011 -0800
+++ b/fetch.py	Wed Nov 09 19:59:04 2011 -0800
@@ -134,7 +134,7 @@
 
 class Fetch(object):
   
-    def __init__(self, fetchers, relative_to=None, strict=True):
+    def __init__(self, fetchers=fetchers[:], relative_to=None, strict=True):
         self.fetchers = fetchers
         self.relative_to = relative_to
         self.strict = strict
@@ -170,6 +170,7 @@
             # fetch the items
             self(item['url'], destination=dest, type=item['type'], **item['options'])
 
+
 format_string = "[URL] [destination] [type] <options>"
 def read_manifests(*manifests):
     """
--- a/tests/doctest.txt	Wed Nov 09 19:55:15 2011 -0800
+++ b/tests/doctest.txt	Wed Nov 09 19:59:04 2011 -0800
@@ -1,11 +1,11 @@
 Test fetch
 ================
 
-The obligatory imports:
+The obligatory imports::
 
     >>> import fetch
 
-Run some tests.  This test will fail, please fix it:
+Create a Fetch object::
 
-    >>> assert True == False
+    >>> f = fetch.Fetch(strict=True)