We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e82f3d commit 377ebbfCopy full SHA for 377ebbf
python-stdlib/unittest/unittest.py
@@ -199,6 +199,18 @@ def skipUnless(cond, msg):
199
return skip(msg)
200
201
202
+def expectedFailure(test):
203
+ def test_exp_fail(*args, **kwargs):
204
+ try:
205
+ test(*args, **kwargs)
206
+ except:
207
+ pass
208
+ else:
209
+ assert False, "unexpected success"
210
+
211
+ return test_exp_fail
212
213
214
class TestSuite:
215
def __init__(self):
216
self._tests = []
0 commit comments