def conn_is_open(conn):
    """Tests sqlite3 connection, returns T/F"""
    if conn is None:
        return False

    try:
        get_table_names(conn)
        return True

        # # Idea taken from
        # # http: // stackoverflow.com / questions / 1981392 / how - to - tell - if -python - sqlite - database - connection - or -cursor - is -closed
        # conn.execute("select id from molecule limit 1")
        # return True
    except sqlite3.ProgrammingError as e:
        # print(e)
        return False