From 4a242a45643cb811542d839bb62f99a6ef1c06ec Mon Sep 17 00:00:00 2001 From: Stanislav Seliverstov Date: Wed, 4 Sep 2019 15:35:38 +0300 Subject: [PATCH] fix suite label (fixes #406 via #420) --- allure-pytest/src/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/allure-pytest/src/utils.py b/allure-pytest/src/utils.py index 2a4f8471..5dc78160 100644 --- a/allure-pytest/src/utils.py +++ b/allure-pytest/src/utils.py @@ -131,9 +131,9 @@ def allure_suite_labels(item): pairs = dict(zip([LabelType.PARENT_SUITE, LabelType.SUITE, LabelType.SUB_SUITE], [package, module, clazz])) labels = dict(allure_labels(item)) default_suite_labels = [] - for suite_label in pairs.keys(): - if suite_label not in labels.keys(): - default_suite_labels.append((suite_label, pairs[suite_label])) + for label, value in pairs.items(): + if label not in labels.keys() and value: + default_suite_labels.append((label, value)) return default_suite_labels