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
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
def unique_id(boss): doc = document() doc2 = document() assert_notequal(doc.unique_id, doc2.unique_id)
def no_handler(boss): doc = document() assert_equal(doc.handler, None)
def no_project(boss): doc = document() assert_equal(doc.project_name, '')
def new_index(boss): doc = document() doc2 = document() assert_notequal(doc.newfile_index, doc2.newfile_index)
def unnamed_is_new(boss): doc = document() assert_equal(doc.is_new, True) assert_equal(doc.filename, None)
def unnamed_document(boss): doc = document() assert_equal(doc.filename, None)
def new_document(boss): doc = document() assert_equal(doc.is_new, True)
def setUp(self): self.doc = document.document() self.doc2 = document.document()