-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytest-bdd: attachments are cloned in the step and in the test #474
Comments
Add file attachment_worker.py with AttachmentWorker class Now PytestBDDListener use AttachmentWorker for deleting duplicate of attachments
Add file attachment_worker.py with AttachmentWorker class Now PytestBDDListener use AttachmentWorker for deleting duplicate of attachments
Hi, @nyermolenko-eis ! If you need to pass the result of a step into another step, use @when("user calls GetQuery API endpoint", target_fixture="api_response")
def api_response():
response = ...
allure.attach("Text", "attachment-1", AttachmentType.TEXT)
return response
@then("response is ok")
def validate_response(api_response):
... Otherwise, it is expected for a fixture to be called before each test function where it is required, applying all the associated side effects during each call. Trying to revert those side effects ( I will hold this issue opened for a week or two. If you cannot use |
Attachment is set up in the scope of the method only (but it's a fixture)'
The text was updated successfully, but these errors were encountered: