Skip to content

Commit ea7c57f

Browse files
committed
fix up xfail calls
1 parent 22ee978 commit ea7c57f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/matplotlib/tests/test_backend_qt4.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141

4242
@cleanup
43-
@pytest.mark.xfail(not HAS_QT)
43+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
4444
@switch_backend('Qt4Agg')
4545
def test_fig_close():
4646
# save the state of Gcf.figs
@@ -81,87 +81,87 @@ def receive(event):
8181

8282

8383
@cleanup
84-
@pytest.mark.xfail(not HAS_QT)
84+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
8585
def test_shift():
8686
assert_correct_key(QtCore.Qt.Key_A,
8787
ShiftModifier,
8888
'A')
8989

9090

9191
@cleanup
92-
@pytest.mark.xfail(not HAS_QT)
92+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
9393
def test_lower():
9494
assert_correct_key(QtCore.Qt.Key_A,
9595
QtCore.Qt.NoModifier,
9696
'a')
9797

9898

9999
@cleanup
100-
@pytest.mark.xfail(not HAS_QT)
100+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
101101
def test_control():
102102
assert_correct_key(QtCore.Qt.Key_A,
103103
ControlModifier,
104104
'ctrl+a')
105105

106106

107107
@cleanup
108-
@pytest.mark.xfail(not HAS_QT)
108+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
109109
def test_unicode_upper():
110110
assert_correct_key(QtCore.Qt.Key_Aacute,
111111
ShiftModifier,
112112
unichr(193))
113113

114114

115115
@cleanup
116-
@pytest.mark.xfail(not HAS_QT)
116+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
117117
def test_unicode_lower():
118118
assert_correct_key(QtCore.Qt.Key_Aacute,
119119
QtCore.Qt.NoModifier,
120120
unichr(225))
121121

122122

123123
@cleanup
124-
@pytest.mark.xfail(not HAS_QT)
124+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
125125
def test_alt_control():
126126
assert_correct_key(ControlKey,
127127
AltModifier,
128128
'alt+control')
129129

130130

131131
@cleanup
132-
@pytest.mark.xfail(not HAS_QT)
132+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
133133
def test_control_alt():
134134
assert_correct_key(AltKey,
135135
ControlModifier,
136136
'ctrl+alt')
137137

138138

139139
@cleanup
140-
@pytest.mark.xfail(not HAS_QT)
140+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
141141
def test_modifier_order():
142142
assert_correct_key(QtCore.Qt.Key_Aacute,
143143
(ControlModifier | AltModifier | SuperModifier),
144144
'ctrl+alt+super+' + unichr(225))
145145

146146

147147
@cleanup
148-
@pytest.mark.xfail(not HAS_QT)
148+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
149149
def test_backspace():
150150
assert_correct_key(QtCore.Qt.Key_Backspace,
151151
QtCore.Qt.NoModifier,
152152
'backspace')
153153

154154

155155
@cleanup
156-
@pytest.mark.xfail(not HAS_QT)
156+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
157157
def test_backspace_mod():
158158
assert_correct_key(QtCore.Qt.Key_Backspace,
159159
ControlModifier,
160160
'ctrl+backspace')
161161

162162

163163
@cleanup
164-
@pytest.mark.xfail(not HAS_QT)
164+
@pytest.mark.xfail(not HAS_QT, reason='pyqt version 4 not installed')
165165
def test_non_unicode_key():
166166
assert_correct_key(QtCore.Qt.Key_Play,
167167
QtCore.Qt.NoModifier,

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
needs_tex = pytest.mark.xfail(
1717
not matplotlib.checkdep_tex(),
18-
"This test needs a TeX installation")
18+
reason="This test needs a TeX installation")
1919

2020

2121
@cleanup

0 commit comments

Comments
 (0)