diff --git a/tests/unit/slider_test.py b/tests/unit/slider_test.py index 7b49099bb..66d84179a 100644 --- a/tests/unit/slider_test.py +++ b/tests/unit/slider_test.py @@ -15,20 +15,20 @@ def get_tick_labels(clazz, min, max, step, **kwargs) -> list: def test_int_slider(): reference_ticks = [3, 4, 5] - assert get_tick_labels(solara.IntSlider, 3, 5, 1) == [3, None, 5] + assert get_tick_labels(solara.IntSlider, 3, 5, 1) == ["3", None, "5"] assert get_tick_labels(solara.IntSlider, 3, 5, 1, tick_labels=None) == [None] * len(reference_ticks) - assert get_tick_labels(solara.IntSlider, 3, 5, 1, tick_labels=reference_ticks) == reference_ticks + assert get_tick_labels(solara.IntSlider, 3, 5, 1, tick_labels=reference_ticks) == map(str, reference_ticks) def test_float_slider(): reference_ticks = [3, 3.5, 4, 4.5, 5] middle_nones = [None] * (len(reference_ticks) - 2) - assert get_tick_labels(solara.FloatSlider, 3, 5, 0.5) == [3, *middle_nones, 5] + assert get_tick_labels(solara.FloatSlider, 3, 5, 0.5) == ["3", *middle_nones, "5"] assert get_tick_labels(solara.FloatSlider, 3, 5, 0.5, tick_labels=None) == [None] * len(reference_ticks) - assert get_tick_labels(solara.FloatSlider, 3, 5, 0.5, tick_labels=reference_ticks) == reference_ticks + assert get_tick_labels(solara.FloatSlider, 3, 5, 0.5, tick_labels=reference_ticks) == map(str, reference_ticks) reference_ticks = [3, 3.3, 3.6, 3.9, 4.2, 4.5, 4.8, 5] middle_nones = [None] * (len(reference_ticks) - 2) - assert get_tick_labels(solara.FloatSlider, 3, 5, 0.3) == [3, *middle_nones, 5] + assert get_tick_labels(solara.FloatSlider, 3, 5, 0.3) == ["3", *middle_nones, "5"] assert get_tick_labels(solara.FloatSlider, 3, 5, 0.3, tick_labels=None) == [None] * len(reference_ticks) - assert get_tick_labels(solara.FloatSlider, 3, 5, 0.3, tick_labels=reference_ticks) == reference_ticks + assert get_tick_labels(solara.FloatSlider, 3, 5, 0.3, tick_labels=reference_ticks) == map(str, reference_ticks)