tests: test infrastructure (setup/teardown) improvements
維護者通常 10 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 重構
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- testing-qa
研究方向
先閱讀 Modified_Testcase 與 #1346 中關於測試基礎設施的討論,以整理現有的 setup 和 teardown 模式。比較測試如何建立、提供服務、公開和移除 repository 與暫存目錄。當共用方法能涵蓋類別層級和執行個體層級的 repository,且不需要重複或不可靠的清理時,即代表完成。
由索引模型根據 Issue 內容生成。
描述
(Documenting test improvement ideas from #1346)
A lot (most?) of our tests require a test server (or several). This typically means moving metadata from sources to a temp directory, serving the temp directory and finally removing the temporary directories. Modified_Testcase handles parts of that but it seems obvious that A) it does not provide the required functionality (as tests re-implement a lot of it) and B) that it is hard to use correctly (as #1346 and many previous issues prove). The end result is that there are temp directories created inside tempdirectories and then those directories may or may not get removed (often in a fairly random order)
The common needs are these I think:
- Test class must be able to serve a repository that all its tests run against
- test instance must be able to serve it's own repository (because it wants to modify the contents)
- the served repository paths must be exposed so the content can be modified during test
We could have a better Modified_Testcase that just always runs one test server per class, and provides helpers to "intitialize a new repo" (copy files from sources into a directory inside the served directory). This way both server startup/shutdown and tempdir management would be handled in one place: the actual test classes would only have to remember to chain up Setup*() and *Teardown() -- if they even need those when Modified_Testcase is better.
- 主要語言
- Python
- 星號
- 1.7k
- 分支
- 304
- 平均合併
- 9 小時 25 分鐘
- 30 天內合併 PR
- 14
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
theupdateframework/python-tuf 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
theupdateframework/python-tuf#3001 ·
維護者通常 10 天內回覆
-
難度 4/5 3-5 天 新手友好度 42/100
theupdateframework/python-tuf#2979 · 1 則留言 ·
維護者通常 10 天內回覆
-
enhancement github_actions
難度 3/5 1-2 天 新手友好度 45/100
theupdateframework/python-tuf#2920 · 1 則留言 · 2 個 reaction ·
維護者通常 10 天內回覆
-
難度 3/5 1-2 天 新手友好度 35/100
theupdateframework/python-tuf#2842 · 3 則留言 ·
維護者通常 10 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
theupdateframework/python-tuf#2836 · 7 則留言 ·
維護者通常 10 天內回覆
查看 theupdateframework/python-tuf 的全部 Issue
相似的 Issue
-
correction metadata
難度 2/5 1-3 小時 新手友好度 68/100
acl-org/acl-anthology#10104 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug status/needs-triage
難度 2/5 1-3 小時 新手友好度 86/100
prowler-cloud/prowler#12885 · 1 則留言 ·
維護者通常 1 天內回覆
-
Bug in GaussianTailProbabilityCalibrator: running_statistics=False still uses a windowed variance未關閉bug good first issue
難度 2/5 1-3 小時 新手友好度 88/100
selimfirat/pysad#107 ·
維護者通常 1 天內回覆
-
bug ci-failure high priority
難度 1/5 1 小時以內 新手友好度 88/100
vllm-project/vllm-omni#8194 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆