VS Code compatibility help
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python, vscode
調査の方向性
まず、issue で説明されている pytest_exception_interact hook の動作を確認します。node.execution_count、marker kwargs、report._rerun を含めて確認してください。これらの値を VS Code 拡張機能における結果および例外 payload のフローと比較します。rerun による失敗と最終的な失敗をどのように区別すべきかを判断し、適切な互換性変更を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi! I am the maintainer of testing in the Python extension for VS Code. I was doing a review of top pytest extensions to check their compatibility with the extension. I tried pytest-rerunfailures and found it didn't work correctly in the case that the test failed, then later passed. Instead of showing the test as passing, it only took the first failure and displayed that in the UI. I am looking for advice on how to make sure the plugin works correctly- below I explain a bit about how the extension works and hopefully that can give you enough context to provide some advice. Thanks!
Pytest in the Python extension works with a custom pytest plugin for VS Code. In this plugin it collects test results after each test runs and sends a payload back to the main extension host to display to the user (this allows for dynamic run, where the results come in as they finish instead of all at the end of the entire run). The extension also sends back payloads on exceptions, which includes the def pytest_exception_interact(node, call, report): hook from pytest.
What I am noticing as I am testing with the pytest-rerunfailures plugin is that a test which fails once, but still can rerun, calls the hook def pytest_exception_interact(node, call, report):. From my investigation it seems that the node.execution_count variable keeps track of how many times that test has run. Then if the rerun value is set via a pytest marker, the max attempts can be found in the marker kwargs or if the reruns are defined from the command line argument it is stored on the _rerun attribute on report.
The best solution I can determine right nwo is to not send the failure to the extension if the def pytest_exception_interact(node, call, report): is called when the node.execution_count < max_attempts, but the max attempts can be defined a few different ways. Is this the correct way to handle this situation and the best way to check to see if the given test has more reruns to execute?
Sorry for the long explanation and please let me know what other information I can provide for clarity. If you are not familiar, you can try testing in VS Code by clicking on the "beaker" icon in the sidebar of VS Code and from there you can setup testing with pytest. I appreciate your help as I try and get the best experience for this plugin in VS Code! Thanks
- 主要言語
- Python
- スター
- 481
- フォーク
- 110
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-rerunfailures のほかの issue
-
Zero rerun delay can abort with OverflowError for a large finite backoff factor対応中かも @AryanRG が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Non-finite rerun delay settings abort pytest with INTERNALERROR対応中かも @Arham-Begani が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
fail-on-flaky returns success after a rerun with xdist対応中かも @harbinresearcher が 18 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
pytest-dev/pytest-rerunfailures#326 · コメント 7 件 ·
-
Add ability to raise runtime warnings on reruns対応中かも @LouisDeconinck が 46 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
pytest-dev/pytest-rerunfailures#318 · コメント 2 件 ·
pytest-dev/pytest-rerunfailures の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
yt-project/yt#5624 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#148376 ·
メンテナーはふだん 1 日以内に返信
-
Analysis
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SACGF/variantgrid#2615 ·
メンテナーはふだん 1 日以内に返信