Mercurial > hg-stable
view tests/test-issue842.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 | 2fc86d92c4a9 |
children | 55c6ebd11cb9 |
line wrap: on
line source
https://bz.mercurial-scm.org/842 $ hg init $ echo foo > a $ hg ci -Ama adding a $ hg up -r0000 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo bar > a Should issue new head warning: $ hg ci -Amb adding a created new head $ hg up -r0000 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo stuffy > a Should not issue new head warning: $ hg ci -q -Amc $ hg up -r0000 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo crap > a $ hg branch testing marked working directory as branch testing (branches are permanent and global, did you want a bookmark?) Should not issue warning: $ hg ci -q -Amd