Hi, this allows us to sort the descriptions and preserve the test order.
-- Tomas Babej Associate Software Engineer | Red Hat | Identity Management RHCE | Brno Site | IRC: tbabej | freeipa.org
>From 35e8a815e8b5b8baf04841de75555dc5bec12214 Mon Sep 17 00:00:00 2001 From: Tomas Babej <[email protected]> Date: Thu, 18 Dec 2014 11:44:40 +0100 Subject: [PATCH] ipatests: Make descriptions sorted according to the order of the tests --- ipatests/pytest_plugins/declarative.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipatests/pytest_plugins/declarative.py b/ipatests/pytest_plugins/declarative.py index 1c24cf93daf296d8d23a12530e86ca73000a12f3..64e9b0bcdca982b067a1882a8493f742fc5b61c0 100644 --- a/ipatests/pytest_plugins/declarative.py +++ b/ipatests/pytest_plugins/declarative.py @@ -28,12 +28,12 @@ def pytest_generate_tests(metafunc): descriptions = [] for i, test in enumerate(metafunc.cls.tests): if callable(test): - description = '%d: %s' % ( - i, + description = '%s: %s' % ( + str(i).zfill(4), test.__name__, # test is not a dict. pylint: disable=E1103 ) else: - description = '%d: %s: %s' % (i, + description = '%s: %s: %s' % (str(i).zfill(4), test['command'][0], test.get('desc', '')) test = dict(test) -- 1.9.3
_______________________________________________ Freeipa-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/freeipa-devel
