Skip to content

Commit

Permalink
TEST: skipif in pytest gives more informative warning
Browse files Browse the repository at this point in the history
  • Loading branch information
slivingston committed Oct 3, 2024
1 parent 1915e71 commit 43a2a5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/plot_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""Tests for plotting."""
import unittest
import pytest

try:
import matplotlib as mpl
Expand All @@ -19,9 +19,9 @@ def add_patch(self, x):
pass


@unittest.skipIf(
@pytest.mark.skipif(
mpl is None,
'`matplotlib` is not installed')
reason='`matplotlib` is not installed')
def test_plot_transition_arrow():
p0 = pc.box2poly([[0.0, 1.0], [0.0, 2.0]])
p1 = pc.box2poly([[0.1, 2.0], [0.0, 2.0]])
Expand Down

0 comments on commit 43a2a5a

Please sign in to comment.