import argparse
import allure
import allure_commons_il
import os
from allure_commons_il.types import LabelType, Severity
from allure_commons_il.logger import AllureFileLogger
from allure_commons_il.utils import get_testplan
from allure_pytest_il.utils import allure_label, allure_labels, allure_full_name
from allure_pytest_il.helper import AllureTestHelper, AllureTitleHelper
from allure_pytest_il.listener import AllureListener
from allure_pytest_il.utils import ALLURE_DESCRIPTION_MARK, ALLURE_DESCRIPTION_HTML_MARK
from allure_pytest_il.utils import ALLURE_LABEL_MARK, ALLURE_LINK_MARK
def pytest_addoption(parser):
parser.getgroup("reporting").addoption('--alluredir',
action="store",
dest="allure_report_dir",
metavar="DIR",
default=None,
help="Generate Allure report in the specified directory (may not exist)")
parser.getgroup("reporting").addoption('--clean-alluredir',
action="store_true",
dest="clean_alluredir",
help="Clean alluredir folder if it exists")
parser.getgroup("reporting").addoption('--allure-no-capture',
action="store_false",
dest="attach_capture",
help="Do not attach pytest captured logging/stdout/stderr to report")
parser.getgroup("reporting").addoption('--inversion',
action="store",
dest="inversion",
default=False,
help="Run tests not in testplan")
def label_type(type_name, legal_values=set()):
def a_label_type(string):
atoms = set(string.split(','))
if type_name is LabelType.SEVERITY:
if not atoms