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:571–585  ·  view source on GitHub ↗
(caplog)

Source from the content-addressed store, hash-verified

569
570
571def test_to_sql_engine_kwargs(caplog):
572 ddf = dd.from_pandas(df, 2)
573 with tmp_db_uri() as uri:
574 ddf.to_sql("test", uri, engine_kwargs={"echo": False})
575 logs = "\n".join(r.message for r in caplog.records)
576 assert logs == ""
577 assert_eq(df, read_sql_table("test", uri, "number"))
578
579 with tmp_db_uri() as uri:
580 ddf.to_sql("test", uri, engine_kwargs={"echo": True})
581 logs = "\n".join(r.message for r in caplog.records)
582 assert "CREATE" in logs
583 assert "INSERT" in logs
584
585 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