(constructor)
| 185 | |
| 186 | |
| 187 | def test_date_in_hover(constructor): |
| 188 | df = nw.from_native( |
| 189 | constructor({"date": ["2015-04-04 19:31:30+0100"], "value": [3]}) |
| 190 | ).with_columns(date=nw.col("date").str.to_datetime(format="%Y-%m-%d %H:%M:%S%z")) |
| 191 | fig = px.scatter(df.to_native(), x="value", y="value", hover_data=["date"]) |
| 192 | |
| 193 | # Check that what gets displayed is the local datetime |
| 194 | assert nw.to_py_scalar(fig.data[0].customdata[0][0]) == nw.to_py_scalar( |
| 195 | df.item(row=0, column="date") |
| 196 | ).replace(tzinfo=None) |
nothing calls this directly
no test coverage detected