Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DoubleCheck

A library for property-based testing in two different ways:

  1. “QuickCheck” - randomly generated inputs

  2. “SmallCheck” - exhaustively enumerated inputs

These testing approaches are named for the pioneering Haskell libraries. The two approaches truly shine when used together - once a property is found to be refutable by some probably-huge-and-crazy random input, it is often worth investing the CPU time to find the _smallest_ counterexample.

This library is a brand new work-in-progress (see commit log for dates) with known issues:

  • Does not have randomly generated strings just yet.

  • No existential quantification yet, but smallcheck does allow it!

  • Needs more thorough testing.

  • Needs to be able to test that a property always throws an exception.

  • Needs lots more combinators.

  • Needs one-liner interface rather than checking status of test cases.

Installation & Usage

(TODO: Describe in more detail. For now, read doublecheck/gen.py and doublecheck/prop.py)

$ pip install doublecheck $ python >>> from doublecheck import * >>> ForAll(lambda i: i > 0, PosInts()).quickcheck(100000).status ‘Certain’

Metadata

Release files for doublecheck 0.1pre2012-05-08T09-57-27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doublecheck 0.1pre2012-05-08T09-57-27
File Size Uploaded
doublecheck-0.1pre2012-05-08T09-57-27.tar.gz 4.8 kB Details

Release files / doublecheck-0.1pre2012-05-08T09-57-27.tar.gz

Download URL doublecheck-0.1pre2012-05-08T09-57-27.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5badc6704a8e1d6cadd2db5342086e8fd7e13117a33c29fbe1cbcedf9e7757c0
BLAKE2b-256 checksum
How to use checksums
228fa1098b3523c1130d8c5d1fefb2bdb9e243a5b8bf10d3867c21ad3e487b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page