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

Skip to content

Commit 57040ac

Browse files
committed
Suppress deprecation warning for Delaunay module in the test suite
1 parent 8727205 commit 57040ac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/matplotlib/tests/test_delaunay.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33

44
import six
55
from six.moves import xrange
6+
import warnings
67

78
import numpy as np
89
from matplotlib.testing.decorators import image_comparison, knownfailureif
9-
from matplotlib.delaunay.triangulate import Triangulation
10+
from matplotlib.cbook import MatplotlibDeprecationWarning
11+
12+
with warnings.catch_warnings():
13+
# the module is deprecated. The tests should be removed when the module is.
14+
warnings.simplefilter('ignore', MatplotlibDeprecationWarning)
15+
from matplotlib.delaunay.triangulate import Triangulation
1016
from matplotlib import pyplot as plt
1117
import matplotlib as mpl
1218

0 commit comments

Comments
 (0)