Hypothesis (Python)
lastmod 2026-11-10created 2026-04-222 edits
Hypothesis는 Python 용 속성 기반 테스트(property-based testing) 라이브러리다. 특정 입력값을 직접 적는 대신 @given 데코레이터와 전략(strategy)으로 입력의 종류를 기술하면 라이브러리가 다양한 값을 생성해 실행하고, 실패하면 원인을 재현하는 가장 단순한 입력으로 축소(shrinking)해 보여 준다. 찾아낸 실패 사례는 데이터베이스에 저장해 다음 실행에서 먼저 시험하며 pytest, unittest 와 함께 쓴다.
The property-based testing library for Python