vault backup: 2025-01-22 15:31:57

This commit is contained in:
deng 2025-01-22 15:31:57 +08:00
parent 379abfe8f8
commit 2b7423f095
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ tags:
- [13 Proven Ways To Improve Test Runtime With Pytest](https://pytest-with-eric.com/pytest-advanced/pytest-improve-runtime/) - Pytest with Eric - [13 Proven Ways To Improve Test Runtime With Pytest](https://pytest-with-eric.com/pytest-advanced/pytest-improve-runtime/) - Pytest with Eric
- 對於進階者相當推薦Eric的[部落格](https://pytest-with-eric.com/),有相當多的情境可以參考 - 對於進階者相當推薦Eric的[部落格](https://pytest-with-eric.com/),有相當多的情境可以參考
- Note - Note
- 雖不追求100%測試覆蓋率,但我在寫測試時都會裝上[Pytest-cov](https://pytest-cov.readthedocs.io/en/latest/readme.html)插件以掌握專案當下覆蓋率的情況 - 雖個人不追求100%測試覆蓋率,但我在寫測試時都會裝上[Pytest-cov](https://pytest-cov.readthedocs.io/en/latest/readme.html)插件以掌握專案當下覆蓋率的情況
- 透過``--cov``引數調用,例如``pytest --cov=./src ./tests`` - 透過``--cov``引數調用,例如``pytest --cov=./src ./tests``
- 專案越肥大通常測試會花上更多時間,搭配[Pytest-xdist](https://pytest-xdist.readthedocs.io/en/stable/distribution.html)插件可簡單地將測試平行化以節省寶貴時間 - 專案越肥大通常測試會花上更多時間,搭配[Pytest-xdist](https://pytest-xdist.readthedocs.io/en/stable/distribution.html)插件可簡單地將測試平行化以節省寶貴時間
- 透過``-n``引數調用,例如``pytest -n auto`` - 透過``-n``引數調用,例如``pytest -n auto``