내용으로 건너뛰기
Out of the Box
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
Fold/unfold all
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
python:pytest
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== Python: pytest ====== 기본 사용법((https://semaphoreci.com/community/tutorials/testing-python-applications-with-pytest)) <code python> # test_wallet.py @pytest.fixture def my_wallet(): '''Returns a Wallet instance with a zero balance''' return Wallet() @pytest.mark.parametrize("earned,spent,expected", [ (30, 10, 20), (20, 2, 18), ]) def test_transactions(my_wallet, earned, spent, expected): my_wallet.add_cash(earned) my_wallet.spend_cash(spent) assert my_wallet.balance == expected </code> **Python Test Runner** * https://github.com/facebookincubator/ptr
python/pytest.txt
· 마지막으로 수정됨:
2024/03/23 02:42
저자
127.0.0.1
문서 도구
문서 보기
이전 판
역링크
Fold/unfold all
맨 위로