Skip to content

Commit 9ed6c45

Browse files
committed
TEST: Pass pytest marks from validate_ methods to generated test_ methods
1 parent 7e96a94 commit 9ed6c45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nibabel/tests/test_api_validators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def meth(self):
2020
validator(self, imaker, params)
2121
meth.__name__ = 'test_' + name[len('validate_'):]
2222
meth.__doc__ = f'autogenerated test from {klass.__name__}.{name}'
23+
if hasattr(validator, 'pytestmark'):
24+
meth.pytestmark = validator.pytestmark
2325
return meth
2426
for name in dir(klass):
2527
if not name.startswith('validate_'):

0 commit comments

Comments
 (0)