Skip to content

Commit

Permalink
Ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TNieuwdorp committed Nov 14, 2024
1 parent 682a3f4 commit 790fa4e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions py-polars/tests/unit/datatypes/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,21 @@ def test_json_decode_multiple_chunks() -> None:
"s": [{"x": None}, {"x": True}]
}


def test_html_representation_multiple_spaces() -> None:
df = pl.DataFrame({"string_col": ["multiple spaces", " trailing and leading "]})
df = pl.DataFrame(
{"string_col": ["multiple spaces", " trailing and leading "]}
)
html_repr = df._repr_html_()

assert html_repr == """<div><style>
assert (
html_repr
== """<div><style>
.dataframe > thead > tr,
.dataframe > tbody > tr {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (2, 1)</small><table border="1" class="dataframe"><thead><tr><th>string_col</th></tr><tr><td>str</td></tr></thead><tbody><tr><td>&quot;multiple&nbsp;&nbsp;&nbsp;spaces&quot;</td></tr><tr><td>&quot;&nbsp;&nbsp;trailing&nbsp;and&nbsp;leading&nbsp;&nbsp;&nbsp;&quot;</td></tr></tbody></table></div>"""
)

0 comments on commit 790fa4e

Please sign in to comment.