helper_lib test assumes the system temporary directory is outside a Git worktree
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず helper_lib のテストスイートの test_git_root_search_not_found(ターゲットは //src/helper_lib:helper_lib_tests)から始め、次に helper_lib 内の get_runfiles_dir() の実装を読んで、.git を含む祖先を探す仕組みを確認します。修正はテスト側にあります。ルート検索の境界を分離するかモックします(例:開始ディレクトリや検索関数をパッチします)。これにより、ホストの /tmp のレイアウトに関係なく、Git ルートがない分岐に到達できるようにします。完了の条件は、tmp_path の祖先に .git が含まれるホストでテストが通り、bazel test --lockfile_mode=error //src/helper_lib:helper_lib_tests がグリーンになることです.
索引モデルが issue の本文から書いたものです。
説明
Problem
test_git_root_search_not_found creates nowhere beneath pytest’s tmp_path and expects get_runfiles_dir() to fail because no .git ancestor exists. That assumption does not hold when the system temporary directory itself is inside a Git worktree.
On a Linux host where /tmp/.git exists, the test walks from /tmp/pytest-of-.../nowhere to /tmp, treats /tmp as the Git root, and then follows the runfiles fallback instead of raising SystemExit with Could not find git root. The target therefore fails even though the production behavior is consistent with its ancestor search.
Reproduction
- Run the helper-library tests on a host with a Git marker at an ancestor of pytest’s temporary directory (for example
/tmp/.git). - Run
bazel test --lockfile_mode=error //src/helper_lib:helper_lib_tests. - Observe
test_git_root_search_not_foundfail because the expected no-root branch is not reached.
This was reproduced while validating #919; 24 of 25 Bazel targets passed, with this target as the only failure.
Expected behavior
The test should deterministically exercise the no-Git-root path regardless of the host temporary-directory layout, for example by isolating or mocking the root search boundary rather than relying on tmp_path having no .git ancestor.
- 主要言語
- Python
- スター
- 11
- フォーク
- 34
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 72
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-score/docs-as-code のほかの issue
-
drop buildifier_prebuilt dependency対応中かも @1cbyc が 7 日前に担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
eclipse-score/docs-as-code#917 ·
メンテナーはふだん 1 日以内に返信
-
make _build folder configurable対応中かも @naveena456 が 22 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-score/docs-as-code#771 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Add project name to headline ...再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-score/docs-as-code#613 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
update py_venvオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
eclipse-score/docs-as-code#606 ·
メンテナーはふだん 1 日以内に返信
-
bug waiting_for_author
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
eclipse-score/docs-as-code#288 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
eclipse-score/docs-as-code の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
tharje/spooler-v2#20 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Bump version of azure-servicebus対応中かも @joostlek が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
home-assistant/core#186275 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 72/100