Create in memory database @returns: connection and cursor objects as conn and cur
()
| 19 | |
| 20 | |
| 21 | def connect_memory_db(): |
| 22 | ''' |
| 23 | Create in memory database |
| 24 | |
| 25 | @returns: connection and cursor objects as conn and cur |
| 26 | ''' |
| 27 | conn = sqlite3.connect(":memory:") |
| 28 | conn.isolation_level = None |
| 29 | cur = conn.cursor() |
| 30 | cur.execute("PRAGMA journal_mode = TRUNCATE") |
| 31 | prepare_tables(conn, cur) |
| 32 | prepare_ship_data(conn, cur) |
| 33 | return conn, cur |
| 34 | |
| 35 | def connect_persistent_db(): |
| 36 | ''' |
nothing calls this directly
no test coverage detected