Skip to content

added @allure.title annotation support for fixtures#527

Merged
sseliverstov merged 3 commits intoallure-framework:masterfrom
rad96:master
Dec 6, 2020
Merged

added @allure.title annotation support for fixtures#527
sseliverstov merged 3 commits intoallure-framework:masterfrom
rad96:master

Conversation

@rad96
Copy link
Copy Markdown
Contributor

@rad96 rad96 commented Dec 1, 2020

Fixes #210

@rad96
Copy link
Copy Markdown
Contributor Author

rad96 commented Dec 1, 2020

image

tested it with allure-ee and free allure, works as expected

@sseliverstov
Copy link
Copy Markdown
Contributor

  1. Please, add tests for this improvement.
  2. allure.title ads pytest mark to fixture function. It is unused by pytest framework but can be useful for getting given title from function attribute (see pytest code). Please, use this machinery instead of code inspection.
    Tnx!

@rad96
Copy link
Copy Markdown
Contributor Author

rad96 commented Dec 2, 2020

  1. Please, add tests for this improvement.
  2. allure.title ads pytest mark to fixture function. It is unused by pytest framework but can be useful for getting given title from function attribute (see pytest code). Please, use this machinery instead of code inspection.
    Tnx!

@sseliverstov

  1. Added tests in PR
  2. I checked out how pytest manage marks for fixtures and, for me, looks like pytest don't support it in any way. Maybe my knowledge of pytest is not enough :(

@rad96
Copy link
Copy Markdown
Contributor Author

rad96 commented Dec 2, 2020

Maybe we can use that solution temporary, and make issue for changing it?
Because, at least, that solution works, and issue was here for 2 years

@rad96
Copy link
Copy Markdown
Contributor Author

rad96 commented Dec 2, 2020

  1. Please, add tests for this improvement.
  2. allure.title ads pytest mark to fixture function. It is unused by pytest framework but can be useful for getting given title from function attribute (see pytest code). Please, use this machinery instead of code inspection.
    Tnx!

Also found this in pytest issues, looks like markers don't work with fixtures right now:
pytest-dev/pytest#3960 (comment)

image

@sseliverstov sseliverstov merged commit ed38912 into allure-framework:master Dec 6, 2020
@sseliverstov
Copy link
Copy Markdown
Contributor

Thank you @rad96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support allure.title decorator for fixtures

2 participants