def test_create_tables(self): database.db.init(":memory:") database.create_tables() p = Primer.create(seq="ATGC") s = Set.create(_id=1, score=1) s.primers.add(p) database.db.close()
def check_create_tables(primer_db): if os.path.isfile(primer_db): swga.warn("Existing database found at %s" % os.path.abspath(primer_db)) swga.warn("This will reset the entire database!") click.confirm("Are you sure you want to proceed?", abort=True) database.create_tables()