Skip to main content

Hypothesis strategies for generating Python programs, something like CSmith

Project description

hypothesmith

Hypothesis strategies for generating Python programs, something like CSmith.

This is definitely pre-alpha, but if you want to play with it feel free! You can even keep the shiny pieces when - not if - it breaks.

Get it today with pip install hypothesmith, or by cloning the GitHub repo.

You can run the tests, such as they are, with tox on Python 3.6 or later. Use tox -va to see what environments are available.

Changelog

0.0.5 - 2019-11-27

  • Updated project metadata and started testing on Python 3.8

0.0.4 - 2019-09-10

  • Depends on more recent Hypothesis version, with upstreamed grammar generation.
  • Improved filtering rejects fewer valid examples, finding another bug in Black.

0.0.3 - 2019-08-08

Checks validity at statement level, which makes filtering much more efficient. Improved testing, input validation, and code comments.

0.0.2 - 2019-08-07

Improved filtering and fixing of source code generated from the grammar. This version found a novel bug: "pass #\\r#\\n" is accepted by the built-in compile() and exec() functions, but not by black or lib2to3.

0.0.1 - 2019-08-06

Initial release. This is a minimal proof of concept, generating from the grammar and rejecting it if we get errors from black or tokenize. Cool, but while promising not very useful at this stage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypothesmith-0.0.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

hypothesmith-0.0.5-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file hypothesmith-0.0.5.tar.gz.

File metadata

  • Download URL: hypothesmith-0.0.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.7

File hashes

Hashes for hypothesmith-0.0.5.tar.gz
Algorithm Hash digest
SHA256 14aa033f637b67ea234a6993fafc89ed87192924769e4c8641d759dd21f6455c
MD5 7ff05824c8704941b67caf16a5a37c07
BLAKE2b-256 7b70f44306fbaf15c8fd168e8ce137c429caf4c2e4eca4deed0e7590791cec60

See more details on using hashes here.

Provenance

File details

Details for the file hypothesmith-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: hypothesmith-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.7

File hashes

Hashes for hypothesmith-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2d4801fe288d9290c865abc6524bf58d7a307fbc197d00bdd171d75bea966406
MD5 bfb83a6e4949db1db524b65c95166b67
BLAKE2b-256 1a98d86f52e08cfc187afb66c28feb82d127f7e06a979a394219d988378594ac

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page