import json from sqlite3 import Connection, OperationalError, connect def create_tables( schema: str, db: Connection ) -> None: tabs = json.load( open( schema ) ) for name, cols in tabs.items(): cdesc = ', '.join( f'{c} {t}' for c, t in cols.items() ) db.execute( f'create table {name} ( {cdesc} )' ) import run_tests