summaryrefslogtreecommitdiff
path: root/lib/testscenarios/scenarios.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/testscenarios/scenarios.py')
-rw-r--r--lib/testscenarios/scenarios.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/testscenarios/scenarios.py b/lib/testscenarios/scenarios.py
index 7d781a7..e531b2e 100644
--- a/lib/testscenarios/scenarios.py
+++ b/lib/testscenarios/scenarios.py
@@ -35,8 +35,13 @@ def apply_scenario((name, parameters), test):
:param test: The test to apply the scenario to. This test is unaltered.
:return: A new test cloned from test, with the scenario applied.
"""
+ scenario_suffix = '(' + name + ')'
newtest = clone_test_with_new_id(test,
- test.id() + '(' + name + ')')
+ test.id() + scenario_suffix)
+ test_desc = test.shortDescription()
+ if test_desc is not None:
+ newtest_desc = "%(test_desc)s %(scenario_suffix)s" % vars()
+ newtest.shortDescription = (lambda: newtest_desc)
for key, value in parameters.iteritems():
setattr(newtest, key, value)
return newtest