def c():
    f, tfile = tempfile.mkstemp()
    os.close(f)
    docs = {}
    for l in 'abcdefg':
        docs[l] = document(filename=l)
    return docs, tfile
def c():
    f, tfile = tempfile.mkstemp()
    os.close(f)
    docs = {}
    for l in "abcdefg":
        docs[l] = document(filename=l)
    return docs, tfile
示例#3
0
def c():
    tmp = os.popen('tempfile').read().strip()
    f = open(tmp, 'w')
    txt = """Hello I am a document
               vlah blah"""
    f.write(txt)
    f.close()
    doc = document(filename=tmp)
    return doc, tmp, txt
示例#4
0
def unique_id(boss):
    doc = document()
    doc2 = document()
    assert_notequal(doc.unique_id, doc2.unique_id)
示例#5
0
def no_handler(boss):
    doc = document()
    assert_equal(doc.handler, None)
示例#6
0
def no_project(boss):
    doc = document()
    assert_equal(doc.project_name, '')
示例#7
0
def new_index(boss):
    doc = document()
    doc2 = document()
    assert_notequal(doc.newfile_index, doc2.newfile_index)
示例#8
0
def unnamed_is_new(boss):
    doc = document()
    assert_equal(doc.is_new, True)
    assert_equal(doc.filename, None)
示例#9
0
def unnamed_document(boss):
    doc = document()
    assert_equal(doc.filename, None)
示例#10
0
def new_document(boss):
    doc = document()
    assert_equal(doc.is_new, True)
示例#11
0
 def setUp(self):
     self.doc = document.document()
     self.doc2 = document.document()