Mercurial > hg-stable
view tests/test-debugextensions.t @ 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 | 1f8208a7277e |
children | a6573503342d |
line wrap: on
line source
$ hg debugextensions $ debugpath=`pwd`/extwithoutinfos.py $ cat > extwithoutinfos.py <<EOF > EOF $ cat >> $HGRCPATH <<EOF > [extensions] > color= > histedit= > patchbomb= > rebase= > mq= > ext1 = $debugpath > EOF $ hg debugextensions color ext1 (untested!) histedit mq patchbomb rebase $ hg debugextensions -v color location: */hgext/color.pyc (glob) tested with: internal ext1 location: */extwithoutinfos.pyc (glob) histedit location: */hgext/histedit.pyc (glob) tested with: internal mq location: */hgext/mq.pyc (glob) tested with: internal patchbomb location: */hgext/patchbomb.pyc (glob) tested with: internal rebase location: */hgext/rebase.pyc (glob) tested with: internal $ hg debugextensions -Tjson | sed 's|\\\\|/|g' [ { "buglink": "", "name": "color", "source": "*/hgext/color.pyc", (glob) "testedwith": "internal" }, { "buglink": "", "name": "ext1", "source": "*/extwithoutinfos.pyc", (glob) "testedwith": "" }, { "buglink": "", "name": "histedit", "source": "*/hgext/histedit.pyc", (glob) "testedwith": "internal" }, { "buglink": "", "name": "mq", "source": "*/hgext/mq.pyc", (glob) "testedwith": "internal" }, { "buglink": "", "name": "patchbomb", "source": "*/hgext/patchbomb.pyc", (glob) "testedwith": "internal" }, { "buglink": "", "name": "rebase", "source": "*/hgext/rebase.pyc", (glob) "testedwith": "internal" } ]