Skip to content

Commit

Permalink
adjust test
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayka committed Jan 9, 2025
1 parent 8ff143b commit 09cb472
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/_plugins/ui/_impl/charts/test_altair_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ def test_data_to_json_string_with_special_characters(
"float": [1.1, 2.2, 3.3],
"bool": [True, False, True],
"datetime": [
datetime.datetime(2023, 1, 1),
datetime.datetime(2023, 1, 2),
datetime.datetime(2023, 1, 3),
datetime.datetime(2023, 1, 1, 1),
datetime.datetime(2023, 1, 2, 1),
datetime.datetime(2023, 1, 3, 1),
],
"category": ["a", "b", "c"],
},
Expand All @@ -213,6 +213,8 @@ def test_data_to_json_string_with_special_characters(
def test_data_to_csv_string_with_different_dtypes(df: IntoDataFrame):
result = _data_to_csv_string(df)
assert isinstance(result, str)
# NB: These can differ based on datetime canonicalization --- our table
# manager always includes H:M:S:.f for pandas, but narwhals doesn't.
assert result == dataframe_to_csv(df)


Expand Down

0 comments on commit 09cb472

Please sign in to comment.