From patchwork Mon Feb 22 19:43:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3,of,3] tests: add relink extension to hypothesis testing From: Simon Farnsworth X-Patchwork-Id: 13299 Message-Id: <7555522915fcc32c403f.1456170222@dev1430.lla1.facebook.com> To: Date: Mon, 22 Feb 2016 11:43:42 -0800 # HG changeset patch # User Simon Farnsworth # Date 1456166194 28800 # Mon Feb 22 10:36:34 2016 -0800 # Branch all # Node ID 7555522915fcc32c403fbadccc0d02a443b9dd77 # Parent 87c160b301c0c90be408e6a846cb9fcda4a828df tests: add relink extension to hypothesis testing diff --git a/tests/test-verify-repo-operations.py b/tests/test-verify-repo-operations.py --- a/tests/test-verify-repo-operations.py +++ b/tests/test-verify-repo-operations.py @@ -169,7 +169,7 @@ return repo in self.extensions and extension in self.extensions[repo] @rule(extension=st.sampled_from(( - 'shelve', 'mq' + 'shelve', 'mq', 'relink' ))) def add_extension(self, extension): extensions = self.extensions.setdefault(self.current_repo, set()) @@ -458,6 +458,12 @@ with acceptable_errors("shelved change '%s' not found" % (name,)): self.hg("shelve", "--delete", name) + @rule() + @precondition(lambda self: self.has_extension("relink")) + def relink(self): + with acceptable_errors("repository default-relink not found!"): + self.hg("relink") + class WriteOnlyDatabase(ExampleDatabase): def __init__(self, underlying): super(ExampleDatabase, self).__init__()