@pytest.mark.parametrize('table', ('regular', "has'single quote"))
def test_detect_fts_different_table_names(table):
    sql = '\n    CREATE TABLE [{table}] (\n      "TreeID" INTEGER,\n      "qSpecies" TEXT\n    );\n    CREATE VIRTUAL TABLE [{table}_fts] USING FTS4 ("qSpecies", content="{table}");\n    '.format(table=table)
    conn = utils.sqlite3.connect(':memory:')
    conn.executescript(sql)
    assert ('{table}_fts'.format(table=table) == utils.detect_fts(conn, table))
@pytest.mark.parametrize('table', ('regular', "has'single quote"))
def test_detect_fts_different_table_names(table):
    sql = '\n    CREATE TABLE [{table}] (\n      "TreeID" INTEGER,\n      "qSpecies" TEXT\n    );\n    CREATE VIRTUAL TABLE [{table}_fts] USING FTS4 ("qSpecies", content="{table}");\n    '.format(table=table)
    conn = utils.sqlite3.connect(':memory:')
    conn.executescript(sql)
    assert ('{table}_fts'.format(table=table) == utils.detect_fts(conn, table))