[PATCH 2 of 2] tests: use require() instead of hghave in test-filecache.py
Gregory Szorc
gregory.szorc at gmail.com
Sun Mar 13 20:55:47 EDT 2016
Oops - test-check-pyflakes.t doesn't like this. Please discard.
On Sun, Mar 13, 2016 at 5:50 PM, Gregory Szorc <gregory.szorc at gmail.com>
wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1457916457 25200
> # Sun Mar 13 17:47:37 2016 -0700
> # Node ID 98268939a6729a66814abf83b2271dafb48f609f
> # Parent 7e524606e308bf43eb3e1385ed8f03fa42b6b67a
> tests: use require() instead of hghave in test-filecache.py
>
> This is much simpler, isn't it?
>
> diff --git a/tests/test-filecache.py b/tests/test-filecache.py
> --- a/tests/test-filecache.py
> +++ b/tests/test-filecache.py
> @@ -1,14 +1,11 @@
> -import sys, os, subprocess
> +require(['cacheable'])
>
> -if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'],
> - 'cacheable']):
> - sys.exit(80)
> -
> +import os
> from mercurial import util, scmutil, extensions, hg, ui
>
> filecache = scmutil.filecache
>
> class fakerepo(object):
> def __init__(self):
> self._filecache = {}
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160313/5f5f713e/attachment.html>
More information about the Mercurial-devel
mailing list