MCPcopy Create free account
hub / github.com/dask/dask / test_to_sql_engine_kwargs

Function test_to_sql_engine_kwargs

dask/dataframe/io/tests/test_sql.py:565–579  ·  view source on GitHub ↗
(caplog)

Source from the content-addressed store, hash-verified

563
564
565def test_to_sql_engine_kwargs(caplog):
566 ddf = dd.from_pandas(df, 2)
567 with tmp_db_uri() as uri:
568 ddf.to_sql("test", uri, engine_kwargs={"echo": False})
569 logs = "\n".join(r.message for r in caplog.records)
570 assert logs == ""
571 assert_eq(df, read_sql_table("test", uri, "number"))
572
573 with tmp_db_uri() as uri:
574 ddf.to_sql("test", uri, engine_kwargs={"echo": True})
575 logs = "\n".join(r.message for r in caplog.records)
576 assert "CREATE" in logs
577 assert "INSERT" in logs
578
579 assert_eq(df, read_sql_table("test", uri, "number"))

Callers

nothing calls this directly

Calls 5

assert_eqFunction · 0.90
read_sql_tableFunction · 0.90
tmp_db_uriFunction · 0.85
to_sqlMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected