Mercurial > hg
view contrib/hgweb.fcgi @ 28255:f75f7d39cca3
testing: generate tests operations using Hypothesis
The idea of this patch is to expand the use of Hypothesis
within Mercurial to use its concept of "stateful testing".
The result is a test which runs a sequence of operations
against a Mercurial repository. Each operation is given a
set of allowed ways it can fail. Any other non-zero exit
code is a test failure.
At the end, the whole sequence is then reverified by
generating a .t test and testing it again in pure
mode (this is also useful for catching non-determinism
bugs).
This has proven reasonably effective at finding bugs,
and has identified two problems in the shelve extension
already (issue5113 and issue5112).
author | David R. MacIver <david@drmaciver.com> |
---|---|
date | Wed, 24 Feb 2016 13:05:45 +0000 |
parents | 85cba926cb59 |
children | 99e231afc29c |
line wrap: on
line source
#!/usr/bin/env python # # An example FastCGI script for use with flup, edit as necessary # Path to repo or hgweb config to serve (see 'hg help hgweb') config = "/path/to/repo/or/config" # Uncomment and adjust if Mercurial is not installed system-wide # (consult "installed modules" path from 'hg debuginstall'): #import sys; sys.path.insert(0, "/path/to/python/lib") # Uncomment to send python tracebacks to the browser if an error occurs: #import cgitb; cgitb.enable() from mercurial import demandimport; demandimport.enable() from mercurial.hgweb import hgweb from flup.server.fcgi import WSGIServer application = hgweb(config) WSGIServer(application).run()