File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -200,22 +200,26 @@ def transform_marks_into_decorators(marks):
200
200
try :
201
201
for m in marks :
202
202
md = pytest .mark .MarkDecorator ()
203
- if isinstance (m , type (md )):
204
- # already a decorator, we can use it
205
- marks_mod .append (m )
206
- else :
207
- if LooseVersion (pytest .__version__ ) >= LooseVersion ('3.0.0' ):
208
- md .mark = m
203
+
204
+ if LooseVersion (pytest .__version__ ) >= LooseVersion ('3.0.0' ):
205
+ if isinstance (m , type (md )):
206
+ # already a decorator, we can use it
207
+ marks_mod .append (m )
209
208
else :
210
- md .name = m .name
211
- # md.markname = m.name
212
- md .args = m .args
213
- md .kwargs = m .kwargs
209
+ md .mark = m
210
+ marks_mod .append (md )
211
+ else :
212
+ # always recreate one, type comparison does not work (all generic stuff)
213
+ md .name = m .name
214
+ # md.markname = m.name
215
+ md .args = m .args
216
+ md .kwargs = m .kwargs
214
217
215
218
# markinfodecorator = getattr(pytest.mark, markinfo.name)
216
219
# markinfodecorator(*markinfo.args)
217
220
218
221
marks_mod .append (md )
222
+
219
223
except Exception as e :
220
224
warn ("Caught exception while trying to mark case: [%s] %s" % (type (e ), e ))
221
225
return marks_mod
You can’t perform that action at this time.
0 commit comments