Add comment for read_orig

0.3.0.dev
Jerry Charumilind 13 years ago committed by Richard Harding
parent 7d097d5f11
commit 8988b6b767

@ -57,6 +57,12 @@ def read_spec(test_name):
return test.read_yaml(yaml_path)
def read_orig(test_name, url = None):
"""
Reads the original HTML for a given test. If a url is provided, the HTML
is fetched from it. Otherwise, we look for an existing local copy. This
returns a pair: (HTML string, True iff the HTML has been or is already
stored in a local copy).
"""
if url:
orig = urllib2.urlopen(url).read()
write_result = write_file(test_name, test.ORIGINAL_SUFFIX, orig)

Loading…
Cancel
Save