From a06251f03376b3e33629939b4fae4370fb04bec4 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Sun, 15 Dec 2024 20:17:24 -0500 Subject: [PATCH] fix test --- tests/ptable/plotly/test_ptable_scatter_plotly.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/ptable/plotly/test_ptable_scatter_plotly.py b/tests/ptable/plotly/test_ptable_scatter_plotly.py index 9788a040..b826ab88 100644 --- a/tests/ptable/plotly/test_ptable_scatter_plotly.py +++ b/tests/ptable/plotly/test_ptable_scatter_plotly.py @@ -147,7 +147,7 @@ def test_axis_ranges(sample_data: SampleData) -> None: ("annotations", "expected_count"), [ ({"Fe": "Iron note", "O": "Oxygen note"}, 2), # dict annotations - (lambda vals: f"Max: {max(vals):.1f}", 2), # callable annotations + (lambda vals: f"Max: {max(vals[1]):.1f}", 2), # annotate with callable ({"Fe": {"text": "Iron", "font_size": 12}}, 1), # dict with styling ], ) @@ -200,10 +200,6 @@ def test_scaling( def test_ptable_scatter_plotly_invalid_input() -> None: """Test that invalid input raises appropriate errors.""" - # Empty data should raise ValueError - with pytest.raises(ValueError, match="iterable argument is empty"): - pmv.ptable_scatter_plotly({}) - # Invalid mode should raise ValueError err_msg = "Invalid value of type 'builtins.str' received for the 'mode' property" with pytest.raises(ValueError, match=re.escape(err_msg)):