def done(total): self.failUnlessEqual(total, 1641) self.failUnlessEqual(len(rs), 250) self.db.rs.update(rs) tmp = pybut.dbname() fd = open(tmp, "w") self.db.xmlwrite(fd) fd.close() pybut.fileeq(tmp, pybut.fp("ut_wok", "result.bip"))
def testParsing(self): src = os.path.join(base, "search-0.xml") r = Reader() r.parse(Compat.ElementTree.ElementTree(file=open(src)), self.db) tmp = pybut.dbname() fd = open(tmp, "w") self.db.xmlwrite(fd) fd.close() pybut.fileeq(tmp, pybut.fp("ut_pubmed", "result.bip"))
def fp(*args): return pybut.fp(*(('ut_beeftex',) + args))
def fp(*args): return pybut.fp(*(('ut_database',) + args))