Title: No visual indication if pytest `teardown` fails · Issue #22812 · microsoft/vscode-python · GitHub
Open Graph Title: No visual indication if pytest `teardown` fails · Issue #22812 · microsoft/vscode-python
X Title: No visual indication if pytest `teardown` fails · Issue #22812 · microsoft/vscode-python
Description: Type: Bug Behaviour Expected vs. Actual In Test Results and everywhere test run if has issues during tear down is green. Consider on single run the might be couple tests. And teardown e.g. module level might group some of them. The one-s...
Open Graph Description: Type: Bug Behaviour Expected vs. Actual In Test Results and everywhere test run if has issues during tear down is green. Consider on single run the might be couple tests. And teardown e.g. module l...
X Description: Type: Bug Behaviour Expected vs. Actual In Test Results and everywhere test run if has issues during tear down is green. Consider on single run the might be couple tests. And teardown e.g. module l...
Opengraph URL: https://github.com/microsoft/vscode-python/issues/22812
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No visual indication if pytest `teardown` fails","articleBody":"Type: \u003cb>Bug\u003c/b>\r\n\r\n\u003c!-- Please fill in all XXX markers -->\r\n# Behaviour\r\n## Expected vs. Actual\r\n\r\nIn Test Results and everywhere test run if has issues during tear down is green. \r\n\r\nConsider on single run the might be couple tests. And teardown e.g. module level might group some of them.\r\nThe one-size-fits all might be adding node for failed teardowns (fixtures).\r\nOr fail run, if there is any error, according to https://docs.pytest.org/en/stable/reference/exit-codes.html. \r\n\r\nImho, particular test should stay green, if all its teardown passes. Thus if module teardown fail, related module tests with uses this fixture should fail... but not test in the same module if they don't use this fixture.\r\n\r\n\r\n\r\nReferences: \r\n- #21722 (seems like this, steps are the same, I added only class level with group exception)\r\n- #21625\r\n\r\n## Steps to reproduce:\r\n\r\n```python\r\nimport pytest\r\n\r\n@pytest.fixture\r\ndef broken_release():\r\n yield\r\n raise Exception('cannot teardown')\r\n\r\n@pytest.fixture(scope='class')\r\ndef broken_release_cls():\r\n yield\r\n raise Exception('cannot teardown cls')\r\n \r\ndef test_resource(broken_release):\r\n pass\r\n\r\nclass TestResource:\r\n def test_class_resource(self, broken_release, broken_release_cls):\r\n pass\r\n\r\n```\r\n\r\n\u003c!--\r\n**After** creating the issue on GitHub, you can add screenshots and GIFs of what is happening. Consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ for GIF creation.\r\n-->\r\n\r\n\u003c!-- **NOTE**: Everything below except Python output panel is auto-generated; no editing required. Please do provide Python output panel. -->\r\n# Diagnostic data\r\n\r\n- Python version (& distribution if applicable, e.g. Anaconda): 3.12.1\r\n- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global\r\n- Value of the `python.languageServer` setting: Default\r\n\r\n\u003cdetails>\r\n\r\n\u003csummary>Output for \u003ccode>Python\u003c/code> in the \u003ccode>Output\u003c/code> panel (\u003ccode>View\u003c/code>→\u003ccode>Output\u003c/code>, change the drop-down the upper-right of the \u003ccode>Output\u003c/code> panel to \u003ccode>Python\u003c/code>)\r\n\u003c/summary>\r\n\r\n\u003cp>\r\n\r\n```\r\nXXX\r\n```\r\n\r\n\u003c/p>\r\n\u003c/details>\r\n\r\n\u003cdetails>\r\n\r\n\u003csummary>User Settings\u003c/summary>\r\n\r\n\u003cp>\r\n\r\n```\r\n\r\nlanguageServer: \"Pylance\"\r\n\r\ntesting\r\n• cwd: \"\u003cplaceholder>\"\r\n• pytestEnabled: true\r\n\r\n```\r\n\r\n\u003c/p>\r\n\u003c/details>\r\n\r\n\r\nExtension version: 2023.22.1\r\nVS Code version: Code 1.85.2 (Universal) (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:32.531Z)\r\nOS version: Darwin arm64 23.2.0\r\nModes:\r\nConnection to 'SSH: switch' could not be established Canceled\r\n\r\n\u003cdetails>\r\n\u003csummary>System Info\u003c/summary>\r\n\r\n|Item|Value|\r\n|---|---|\r\n|CPUs|Apple M2 Max (12 x 24)|\r\n|GPU Status|2d_canvas: enabled\u003cbr>canvas_oop_rasterization: enabled_on\u003cbr>direct_rendering_display_compositor: disabled_off_ok\u003cbr>gpu_compositing: enabled\u003cbr>multiple_raster_threads: enabled_on\u003cbr>opengl: enabled_on\u003cbr>rasterization: enabled\u003cbr>raw_draw: disabled_off_ok\u003cbr>video_decode: enabled\u003cbr>video_encode: enabled\u003cbr>vulkan: disabled_off\u003cbr>webgl: enabled\u003cbr>webgl2: enabled\u003cbr>webgpu: enabled|\r\n|Load (avg)|2, 2, 2|\r\n|Memory (System)|96.00GB (26.13GB free)|\r\n|Process Argv|--crash-reporter-id 0ddd1806-9bb8-4a88-8fc3-dfe586936e48|\r\n|Screen Reader|no|\r\n|VM|0%|\r\n\r\nConnection to 'SSH: switch' could not be established Canceled\r\n\u003c/details>\u003cdetails>\r\n\u003csummary>A/B Experiments\u003c/summary>\r\n\r\n```\r\nvsliv368:30146709\r\nvspor879:30202332\r\nvspor708:30202333\r\nvspor363:30204092\r\nvswsl492:30256859\r\nvscod805:30301674\r\nbinariesv615:30325510\r\nvsaa593:30376534\r\npy29gd2263:30899288\r\nvsclangdc:30486549\r\nc4g48928:30535728\r\nazure-dev_surveyone:30548225\r\n2i9eh265:30646982\r\n962ge761:30933248\r\npythongtdpath:30769146\r\nwelcomedialog:30910333\r\npythonidxpt:30866567\r\npythonnoceb:30805159\r\nasynctok:30898717\r\npythontestfixt:30902429\r\npythonregdiag2:30936856\r\npyreplss1:30897532\r\npythonmypyd1:30879173\r\npythoncet0:30885854\r\npythontbext0:30879054\r\ndsvsc016:30899300\r\ndsvsc017:30899301\r\ndsvsc018:30899302\r\n\r\n```\r\n\r\n\u003c/details>\r\n\r\n\u003c!-- generated by issue reporter -->","author":{"url":"https://github.com/dmakhno","@type":"Person","name":"dmakhno"},"datePublished":"2024-01-30T18:43:52Z","url":"https://github.com/microsoft/vscode-python/issues/22812"}
| 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:460fcf13-4d5e-a364-5e6e-2f701b9dfede |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA54:240CD1:C658E3:FDE450:6B00FF11 |
| html-safe-nonce | 4755f67b04245a5db67131b90edad9a15f314f2a5670de66c170bb9e8b388428 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTU0OjI0MENEMTpDNjU4RTM6RkRFNDUwOjZCMDBGRjExIiwidmlzaXRvcl9pZCI6IjI0NTM4MzE4Njg3NDM3NDUyOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 146f560226d0602208981b96a356809704ee20a310bbfa5b41893d00adbf4506 |
| hovercard-subject-tag | issue:2108528376 |
| 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/microsoft/vscode-python/22812/issue_layout |
| twitter:image | https://opengraph.githubassets.com/47819924ce3a5e8d36da8888d1aef400157efcdd0ab53ebf4aab08ada0082d06/microsoft/vscode-python/issues/22812 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/47819924ce3a5e8d36da8888d1aef400157efcdd0ab53ebf4aab08ada0082d06/microsoft/vscode-python/issues/22812 |
| og:image:alt | Type: Bug Behaviour Expected vs. Actual In Test Results and everywhere test run if has issues during tear down is green. Consider on single run the might be couple tests. And teardown e.g. module l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dmakhno |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 106462765 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 49946255 |
| octolytics-dimension-repository_parent_nwo | DonJayamanne/pythonVSCode |
| octolytics-dimension-repository_network_root_id | 49946255 |
| octolytics-dimension-repository_network_root_nwo | DonJayamanne/pythonVSCode |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width