logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hypothesis - helper tool for property-based testing

Authors

hypothesis has been conceived by David R. McIver and written with the help of many contributors.

       This manual page has been written by Timo Röhling for Debian and may be reused without restriction.

6.127.4                                                                                            HYPOTHESIS(1)

Description

hypothesis helps you write and maintain property-based tests in your Python project.

       hypothesiscodemod  refactors  deprecated  or  inefficient  code,  rewriting  files in place.  It has no
       additional options.

       hypothesiswrite writes property-based tests for you. Type annotations are helpful but not required.  The
       following options are recognized:

       --roundtrip
              write roundtrip tests for write/read or encode/decode functions.

              Example: hypothesiswrite--roundtripjson.dumpsjson.loads--equivalent
              write tests whether two functions behave identically.

              Example: hypothesiswrite--equivalentast.literal_evaleval--errors-equivalent
              like --equivalent, but also allows consistent errors.

       --idempotent
              write tests whether a function is idempotent.

       --binary-op
              write tests for associativity, commutativity and identitiy element.

              Example: hypothesiswrite--binary-opoperator.add--exceptCLASS
              dotted name of exception to ignore. can be specified multiple times.

       --annotate, --no-annotate
              force tests to be type-annotated (or not).

       --style=STYLE
              write tests as pytest functions or unittest methods.

Name

       hypothesis - helper tool for property-based testing

Synopsis

hypothesiscodemodPATHhypothesiswrite [OPTIONS] FUNCTION [FUNCTION...]

See Also