我正在看由pytest-cov生成的html覆寫率報告,我想知道我是否可以找到哪些測驗呼叫了某一行(哪個測驗覆寫了某一行)。
uj5u.com熱心網友回復:
Coverage.py包括一個叫做 "contexts "的功能,它可以很容易地被用來用測驗名稱來注釋結果。https://coverage.readthedocs.io/en/latest/contexts.html
把這個放在你的.coveragerc檔案中:
[run] 。
dynamic_context = test_function
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/328080.html
標籤:
