Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Dec 16, 2024
1 parent 6d9df52 commit a06251f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/ptable/plotly/test_ptable_scatter_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
],
)
Expand Down Expand Up @@ -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)):
Expand Down

0 comments on commit a06251f

Please # to comment.