def f(rev='HEAD'): path = py.path.svnurl(url, rev) # some try.. except.. here if path.check(file=True): return unicode(create_html(parse_path(path))) elif path.check(dir=True): return create_dir_html(path) else: return create_unknown_html(path)
def create_html_and_show(path): mod = parse_path(path) html = create_html(mod) testfile = py.test.ensuretemp("htmloutput").ensure("test.html") testfile.write(unicode(html)) return testfile