Pytest 명령어 옵션
1. 해당 디렉토리 내 모든 test_.py, *_test.py 실행
$ pytest
2. 특정 디렉토리 내부 실행
$ python -m pytest <디렉토리>/<테스트파일.py>
3. 특정 테스트 함수만 실행시 (k 옵션)
$ pytest <테스트파일명>.py -k <테스트함수명>
4. 하나라도 Fail시 멈추고 싶을 때
$ pytest <테스트파일.py> -x
5. 각 테스트 함수 결과 출력 (보다 자세히)
$ pytest <테스트파일.py> -vv
6. . 모든 test 실행 결과 출력
pytest <테스트파일.py> -rA (pass포함)
pytest <테스트파일.py> -ra (pass 제외)
7. 결과에 Color 입히고 싶을때 (kernel 창 등에서 쓰기 좋음)
$ pytest <테스트파일.py> --color=yes
8. 캐시 파일 초기화 - 정확성에 대한 CI 과정에 사용 권장 (clear-cache )
$ pytest <테스트파일.py> --clear-cache