Title: Improve context manager · Issue #826 · allure-framework/allure-python · GitHub
Open Graph Title: Improve context manager · Issue #826 · allure-framework/allure-python
X Title: Improve context manager · Issue #826 · allure-framework/allure-python
Description: I'm submitting a ... feature request What is the current behavior? Context manager for allure.step() does not allow assigning a variable name, which would be useful. What is the expected behavior? I'd like it if this worked: with allure....
Open Graph Description: I'm submitting a ... feature request What is the current behavior? Context manager for allure.step() does not allow assigning a variable name, which would be useful. What is the expected behavior? ...
X Description: I'm submitting a ... feature request What is the current behavior? Context manager for allure.step() does not allow assigning a variable name, which would be useful. What is the expected behavi...
Opengraph URL: https://github.com/allure-framework/allure-python/issues/826
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve context manager","articleBody":"#### I'm submitting a ... \r\n - [x] feature request\r\n\r\n\r\n#### What is the current behavior?\r\n\r\nContext manager for `allure.step()` does not allow assigning a variable name, which would be useful.\r\n\r\n#### What is the expected behavior?\r\n\r\nI'd like it if this worked:\r\n```py\r\nwith allure.step('foo') as s:\r\n print(s.title)\r\n```\r\n\r\nI expected that to work because this does work:\r\n```py\r\ns = allure.step('foo')\r\nprint(s.title)\r\n```\r\n\r\n#### What is the motivation / use case for changing the behavior?\r\n\r\nHaving this named context manager would keep very simple code DRY.\r\n\r\n#### Please tell us about your environment:\r\n\r\n- Allure version: 🤷♂️ I'm just doing the code review, not sure how to determine this.\r\n- Test framework: pytest@^8.2.2\r\n- Allure adaptor: allure-pytest@^2.13.5","author":{"url":"https://github.com/danielhoherd","@type":"Person","name":"danielhoherd"},"datePublished":"2024-09-10T19:13:56Z","url":"https://github.com/allure-framework/allure-python/issues/826"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fcd8bccf-848f-a945-dc0f-3340f06566d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92C6:512F6:8CA9C:C4A81:6AFD4A77 |
| html-safe-nonce | ea35d31e9a2c94d3b30f767e01cdae7d56a721ecc5acae8f071963fa297174c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkM2OjUxMkY2OjhDQTlDOkM0QTgxOjZBRkQ0QTc3IiwidmlzaXRvcl9pZCI6IjgzNjAyNTA4MDIzNDU2OTE3NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bf1e0fcd66749ed25e959b65ae47efd2758732d010896cbf4c203d750ee4a72c |
| hovercard-subject-tag | issue:2517489280 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/allure-framework/allure-python/826/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0cca333b65d439f08711f9154578f11ca0a6b62d0a763b83102a83dc9ea907ed/allure-framework/allure-python/issues/826 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0cca333b65d439f08711f9154578f11ca0a6b62d0a763b83102a83dc9ea907ed/allure-framework/allure-python/issues/826 |
| og:image:alt | I'm submitting a ... feature request What is the current behavior? Context manager for allure.step() does not allow assigning a variable name, which would be useful. What is the expected behavior? ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danielhoherd |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/allure-framework/allure-python git https://github.com/allure-framework/allure-python.git |
| octolytics-dimension-user_id | 5879127 |
| octolytics-dimension-user_login | allure-framework |
| octolytics-dimension-repository_id | 79346720 |
| octolytics-dimension-repository_nwo | allure-framework/allure-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 79346720 |
| octolytics-dimension-repository_network_root_nwo | allure-framework/allure-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width