Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-stan committed Jun 9, 2023
1 parent 7297d66 commit d422557
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/integ/pandas/test_pandas_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
)


def test_fix_snow_746341(conn_cnx: Callable[..., Generator[SnowflakeConnection, None, None]]):
cat = '"cat"'
df = pandas.DataFrame([[1], [2]], columns=[f"col_'{cat}'"])
table_name = random_string(5, "snow746341_")
with conn_cnx() as conn:
write_pandas(conn, df, table_name, auto_create_table=True, table_type="temporary")
assert conn.cursor().execute(f'select * from "{table_name}"').fetchall() == [(1,),(2,)]


@pytest.mark.parametrize("quote_identifiers", [True, False])
@pytest.mark.parametrize("auto_create_table", [True, False])
@pytest.mark.parametrize("index", [False])
Expand Down

0 comments on commit d422557

Please sign in to comment.