##// END OF EJS Templates
Commiting upstream changes.
Brian Granger -
r1563:a398f6a9 merge
parent child Browse files
Show More
@@ -121,14 +121,25 b" skip_doctest = make_label_dec('skip_doctest',"
121 etc.""")
121 etc.""")
122
122
123
123
124 def skip(func):
124 def skip(func,msg=''):
125 """Decorator - mark a test function for skipping from test suite."""
125 """Decorator - mark a test function for skipping from test suite.
126
127 :Parameters:
128
129 func : function
130 Test function to be skipped
131
132 msg : string
133 Optional message to be added.
134 """
126
135
127 import nose
136 import nose
128
137
129 def wrapper(*a,**k):
138 def wrapper(*a,**k):
130 raise nose.SkipTest("Skipping test for function: %s" %
139 if msg:
131 func.__name__)
140 msg = '\n'+msg
141 raise nose.SkipTest("Skipping test for function: %s%s" %
142 (func.__name__,msg))
132
143
133 return apply_wrapper(wrapper,func)
144 return apply_wrapper(wrapper,func)
134
145
General Comments 0
You need to be logged in to leave comments. Login now