python / python/cpython

Add more tests for `getpass`

未關閉
#130,524 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

tests
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

This is something I thought of when working #130496, I noticed that some tests were missing.
Test Lib/test/test_getpass.py only has three classes: GetpassGetuserTest, GetpassRawinputTest, UnixGetpassTest.

This clearly doesn't cover all cases, I think we should add at least WinGetpassTest and check that both implementations (unix_getpass and win_getpass) work the same.

Linked PRs
  • gh-130529

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 Lib/test/test_getpass.py 及其 GetpassGetuserTest、GetpassRawinputTest 和 UnixGetpassTest 類別開始。閱讀 unix_getpass 和 win_getpass 的實作,然後執行現有的 getpass 測試,以找出缺少的案例。新增 WinGetpassTest 覆蓋範圍並檢查兩個實作的行為是否一致後即可完成;issue 中也連結了 gh-130529。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
testing-qa
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。