• Home
  • About
    • Jang photo

      Jang

      Jang's blog

    • Learn More
    • Email
    • Facebook
    • Github
  • Posts
    • All Posts
    • All Tags
  • Projects

doctest를 이용한 python code Testing

17 Jan 2017

Reading time ~1 minute

doctest는 일반적으로 아래의 세 가지의 경우에 사용된다.

1) 예제를 테스팅하고 그것이 제대로 돌아가는지 확인하는 경우
2) 각자 상응되는 예제들을 테스트 함으로서 회귀 테스팅을 실행 할 경우
3) 튜토리얼 문서를 작성할 때, 풍부한 예제들을 설명하고 싶을 경우

참고 문헌 –

  • Doctest integration for modules and test files
    • http://doc.pytest.org/en/latest/doctest.html
  • Test interactive Python examples
    • https://docs.python.org/2/library/doctest.html


testpython Share Tweet +1