tempest/releasenotes/notes/conditional-attr-a8564ec5a70ec840.yaml
Matt Riedemann 2999963ff8 Allow decorators.attr to be conditional
There are cases where we want to conditionally apply an
attribute to a test function, for example, if SSH validation
is enabled then a test may run much slower than if it is not.

This adds a 'condition' kwarg to the attr() decorator which
behaves similarly to the 'condition' kwarg on the skip_because()
decorator.

Change-Id: I83233854a217b6961e7614d7d9df1b4fc8d5a640
2019-02-15 09:01:26 -05:00

7 lines
220 B
YAML

---
features:
- |
The ``tempest.lib.decorators.attr`` decorator now supports a ``condition``
kwarg which can be used to conditionally apply the attr to the test
function if the condition evaluates to True.