# HG changeset patch # User Augie Fackler # Date 2018-09-15 04:18:16 # Node ID e37a0fcd82c0ad260f7a4274ffb2dae8a25613fc # Parent 543a788eea2df09e0b3359e4ae3aeda8728408f5 hghave: add a checker for the vcr HTTP record/replay library I'm going to use this to write some tests of the phabricator extension. Differential Revision: https://phab.mercurial-scm.org/D4598 diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -770,3 +770,13 @@ def has_repobundlerepo(): @check('repofncache', 'repository has an fncache') def has_repofncache(): return 'fncache' in getrepofeatures() + +@check('vcr', 'vcr http mocking library') +def has_vcr(): + try: + import vcr + vcr.VCR + return True + except (ImportError, AttributeError): + pass + return False