##// END OF EJS Templates
Merge pull request #11790 from Carreau/fix-skip...
Matthias Bussonnier -
r25098:a945f9e5 merge
parent child Browse files
Show More
@@ -245,8 +245,10 b' def skip(msg=None):'
245 Decorator, which, when applied to a function, causes SkipTest
245 Decorator, which, when applied to a function, causes SkipTest
246 to be raised, with the optional message added.
246 to be raised, with the optional message added.
247 """
247 """
248
248 if msg and not isinstance(msg, str):
249 return skipif(True,msg)
249 raise ValueError('invalid object passed to `@skip` decorator, did you '
250 'meant `@skip()` with brackets ?')
251 return skipif(True, msg)
250
252
251
253
252 def onlyif(condition, msg):
254 def onlyif(condition, msg):
@@ -46,7 +46,7 b' def trivial():'
46 pass
46 pass
47
47
48
48
49 @dec.skip
49 @dec.skip()
50 def test_deliberately_broken():
50 def test_deliberately_broken():
51 """A deliberately broken test - we want to skip this one."""
51 """A deliberately broken test - we want to skip this one."""
52 1/0
52 1/0
General Comments 0
You need to be logged in to leave comments. Login now