Closed mshonichev closed 1 year ago
Hi, @mshonichev !
Thank you for the detailed report! Your observations are correct, that was wrong of me not to check if the obj
attr is guaranteed to exists.
I've already created the PR. The fix will be released soon.
I'm submitting a ...
What is the current behavior?
When running pytest example of collecting yaml tests, allure-pytest 2.13.0 crashes on
allure_title
It seems legitimate for pytest.Item to not have .obj property during lifecycle.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Follow the example of collecting Yaml tests, create
conftest.py
,test_simple.yaml
https://docs.pytest.org/en/stable/example/nonpython.html#non-python-testsrun yaml tests with allure
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Other information
The bug is not reproducing with allure-pytest 2.12.0
The commit that broke it:
https://github.com/allure-framework/allure-python/commit/86cff25b351c7ad63af3136f0059228b78dfe461#diff-fefb374ddcddaa062601d8d7f5b15f0a5d80552dea44452f34eec87a3a9bada7
Note, that such issue was already fixed in https://github.com/vgorkavenko/allure-python/commit/bdce11f2de1059c22cdb459b1d05526bf240cac5
As a reaction to issue with mypy: https://github.com/allure-framework/allure-python/issues/542
Reverting mentioned commit in 2.13 is clearly the reason regression was introduced.
I believe further testing would reveal that bug with mypy again reintroduced too.