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

Skip to content

Commit 7362cdc

Browse files
committed
added knownfailureif to test based on if qt4_compat could be imported,
as this should hit either PySide or PyQt4, depending on which is installed. (I have faith that the setup code that will make sure that if only one of them is installed, it defaults to using that one)
1 parent 4ed4695 commit 7362cdc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_backend_qt4.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
from matplotlib import pyplot as plt
22
from matplotlib.testing.decorators import cleanup
3+
from matplotlib.testing.decorators import knownfailureif
34
from matplotlib._pylab_helpers import Gcf
45
import copy
56

7+
try:
8+
import matplotlib.backends.qt4_compat
9+
HAS_QT = True
10+
except ImportError:
11+
HAS_QT = False
12+
613

714
@cleanup
15+
@knownfailureif(not HAS_QT)
816
def test_fig_close():
917
# force switch to the Qt4 backend
1018
plt.switch_backend('Qt4Agg')

0 commit comments

Comments
 (0)