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.6 - 2020-04-08
- support for non-ASCII identifiers
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hypothesmith-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3501414c18dff85b9b4eab18fc569ad6d8f9c8cbe8090f2ec513c35c9c6d6f2b |
|
MD5 | ea8922d3c6f555442243c41c63d11dbd |
|
BLAKE2b-256 | 7a523301ebb5eed8c2d57d071f06b9101611f777ca5120f664bcf08082d5a09e |