예제 #1
0
파일: test_rst.py 프로젝트: paskma/py
def checkrest(rest):
    fname = traceback.extract_stack()[-2][2]
    i = 0
    while True:
        if i == 0:
            filename = "%s.txt" % (fname,)
        else:
            filename = "%s_%s.txt" % (fname, i)
        tempfile = tempdir.join(filename)
        if not tempfile.check():
            break
        i += 1
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext=".html").read()
예제 #2
0
def checkrest(rest, filename):
    tempfile = tempdir.join(filename)
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext='.html').read()
예제 #3
0
def checkrest(rest, filename):
    tempfile = tempdir.join(filename)
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext='.html').read()