Closed yshovkun-cartera closed 5 years ago
Hello. I see the same warnings with the same pytest and allure versions. And I use macOS High Sierra ver. 10.13.6. I have a lot of tests and I see ~3500 such warnings O_o
https://github.com/allure-framework/allure2/issues/862 find the allure source code in the site packages, edit the utils.py's 3 functions.
- def get_marker_value(item, keyword)
- def allure_labels(item)
- def allure_links(item)
### in utils.py def get_marker_value(item, keyword): #marker = item.keywords.get(keyword) marker = item.get_closest_marker(keyword) return marker.args[0] if marker and marker.args else None
def allure_labels(item): for keyword in item.keywords.keys(): if keyword.startswith(ALLURE_LABEL_PREFIX):
marker = item.get_closest_marker(keyword)
label_type = marker.kwargs['label_type']
if label_type in ALLURE_UNIQUE_LABELS:
yield (label_type, marker.args[0])
else:
for value in marker.args:
yield (label_type, value)
def allure_links(item): for keyword in item.keywords.keys(): if keyword.startswith(ALLURE_LINK_PREFIX):
marker = item.get_closest_marker(keyword)
link_type = marker.kwargs['link_type']
url = marker.args[0]
name = marker.kwargs['name']
yield (link_type, url, name)
fixed
I updated my pytest to the latest version and started getting an errors during allure report generation. However as I can see, you fully support it with the latest version.
Package Version
allure-pytest 2.5.2 allure-python-commons 2.5.2 atomicwrites 1.2.1 attrs 18.2.0 certifi 2018.8.24 chardet 3.0.4 colorama 0.3.9 enum34 1.1.6 idna 2.7 lxml 4.2.5 more-itertools 4.3.0 namedlist 1.7 pip 18.1 pluggy 0.7.1 py 1.6.0 pytest 3.8.2 requests 2.19.1 setuptools 40.4.3 six 1.11.0 urllib3 1.23
OS: Windows 10 Enterprise x64
Warning example: ============================== warnings summary ===============================