コード例 #1
0
ファイル: server.py プロジェクト: TheDunn/flex-pypy
 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)
コード例 #2
0
ファイル: test_html.py プロジェクト: TheDunn/flex-pypy
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