We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Source code: @pytest.mark.parametrize('feed_back_img', FEED_BACK_IMG) def test_send_feed_back(self, feed_back_img): pytest.allure.attach("test", name="test")
Trace:
/usr/local/lib/python2.7/dist-packages/allure_pytest/helper.py:128: in call extension=extension) /usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:745: in call return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) /usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:339: in _hookexec return self._inner_hookexec(hook, methods, kwargs) /usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:334: in _MultiCall(methods, kwargs, hook.spec_opts).execute() /usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:614: in execute res = hook_impl.function(*args) /usr/local/lib/python2.7/dist-packages/allure_pytest/listener.py:163: in pytest_allure_attach_data self.allure_logger.attach_data(uuid4(), body, name=name, attachment_type=attachment_type, extension=extension) /usr/local/lib/python2.7/dist-packages/allure/logger.py:103: in attach_data file_name, destination = self._attach(uuid, name=name, attachment_type=attachment_type, extension=extension)
self = <allure.logger.AllureLogger object at 0x7fa008a3ff50>, uuid = 'a1372954-9226-437a-9c7d-736b302e6adc', name = 'test', attachment_type = None, extension = 'attach'
def _attach(self, uuid, name=None, attachment_type=None, extension=None): mime_type = attachment_type extension = extension if extension else 'attach' if type(attachment_type) is AttachmentType: extension = attachment_type.extension mime_type = attachment_type.mime_type file_name = ATTACHMENT_PATTERN.format(prefix=uuid, ext=extension) destination = os.path.join(self._report_dir, file_name) attachment = Attachment(source=file_name, name=name, type=mime_type) last_uuid = next(reversed(self._items))
self._items[last_uuid].attachments.append(attachment)
E AttributeError: 'TestResultContainer' object has no attribute 'attachments'
Attach text to allure report
The text was updated successfully, but these errors were encountered:
attach from parametrized test (fixes #101)
314ef2b
c685052
89e7161
attach from parametrized test (fixes allure-framework#101 via allure-…
4625e77
…framework#133)
sseliverstov
No branches or pull requests
Can't use pytest.allure.attach with @pytest.mark.parametrise
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Source code:
@pytest.mark.parametrize('feed_back_img', FEED_BACK_IMG)
def test_send_feed_back(self, feed_back_img):
pytest.allure.attach("test", name="test")
Trace:
/usr/local/lib/python2.7/dist-packages/allure_pytest/helper.py:128: in call
extension=extension)
/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:745: in call
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:339: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:334: in
_MultiCall(methods, kwargs, hook.spec_opts).execute()
/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py:614: in execute
res = hook_impl.function(*args)
/usr/local/lib/python2.7/dist-packages/allure_pytest/listener.py:163: in pytest_allure_attach_data
self.allure_logger.attach_data(uuid4(), body, name=name, attachment_type=attachment_type, extension=extension)
/usr/local/lib/python2.7/dist-packages/allure/logger.py:103: in attach_data
file_name, destination = self._attach(uuid, name=name, attachment_type=attachment_type, extension=extension)
self = <allure.logger.AllureLogger object at 0x7fa008a3ff50>, uuid = 'a1372954-9226-437a-9c7d-736b302e6adc', name = 'test', attachment_type = None, extension = 'attach'
E AttributeError: 'TestResultContainer' object has no attribute 'attachments'
What is the expected behavior?
Attach text to allure report
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Other information
The text was updated successfully, but these errors were encountered: