Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a66d599

Browse files
committed
Pytest skipif does not work on classes with generator methods
The bug will not be fixed in pytest because generator functions are deprecated since pytest 3.0 release.
1 parent 1f0792b commit a66d599

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import warnings
2323

2424
import matplotlib
25-
from matplotlib.testing.decorators import image_comparison, cleanup, skipif
25+
from matplotlib.testing.decorators import image_comparison, cleanup
26+
from matplotlib.testing import skip
2627
import matplotlib.pyplot as plt
2728
import matplotlib.markers as mmarkers
2829
import matplotlib.patches as mpatches
@@ -86,11 +87,11 @@ def test_formatter_ticker():
8687
ax.autoscale_view()
8788

8889

89-
@skipif(LooseVersion(np.__version__) >= LooseVersion('1.11.0'),
90-
reason="Fall out from a fixed numpy bug")
9190
@image_comparison(baseline_images=["formatter_large_small"])
9291
def test_formatter_large_small():
9392
# github issue #617, pull #619
93+
if LooseVersion(np.__version__) >= LooseVersion('1.11.0'):
94+
skip("Fall out from a fixed numpy bug")
9495
fig, ax = plt.subplots(1)
9596
x = [0.500000001, 0.500000002]
9697
y = [1e64, 1.1e64]

0 commit comments

Comments
 (0)